mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
IC: Fix sql_save as generator value type.
This commit is contained in:
1 parent
fd0a8ddf51
commit
ccbbc83502
2 files changed
+15
-1
No files matched your search
@@ -16,6 +16,7 @@
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import types
|
||||
import logging
|
||||
|
||||
from copy import copy
|
||||
@@ -64,7 +65,12 @@ class PamhyrModelDict(SQLSubModel):
|
||||
|
||||
def get(self, key):
|
||||
if key in self._dict:
|
||||
return self._dict[key]
|
||||
v = self._dict[key]
|
||||
|
||||
if type(v) == types.GeneratorType:
|
||||
return list(v)
|
||||
|
||||
return v
|
||||
|
||||
new = self.new(key)
|
||||
self.set(key, new)
|
||||
|
||||
Reference in new issue
Block a user