Fixes for thread safe in models
This commit is contained in:
parent
50c030de53
commit
e0a2c2cf57
2 changed files with 9 additions and 2 deletions
|
|
@ -25,7 +25,10 @@ def insert(model, dict_values, external_agent=True):
|
|||
query_error=False
|
||||
last_sql=''
|
||||
|
||||
model.fields[model.name_field_id].required=False
|
||||
#model.fields[model.name_field_id].required=False
|
||||
|
||||
if model.name_field_id in dict_values:
|
||||
del dict_values[model.name_field_id]
|
||||
|
||||
try:
|
||||
|
||||
|
|
|
|||
|
|
@ -272,10 +272,14 @@ class WebModel:
|
|||
|
||||
self.name_field_id=name_field_id
|
||||
|
||||
#Fields of the table, inserte with register method
|
||||
#Fields of the table, inserted with register method
|
||||
|
||||
self.fields=OrderedDict()
|
||||
|
||||
# Errors of fields of the table, for safe thread reasons.
|
||||
|
||||
self.fields_error=OrderedDict()
|
||||
|
||||
#The tables related with foreignkeyfield to this table
|
||||
|
||||
self.related=[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue