IC: Fix sql_save as generator value type.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-11-20 16:10:10 +01:00
1 parent fd0a8ddf51
commit ccbbc83502
2 files changed
+15 -1

No files matched your search

+7 -1
View File
@@ -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)