Fixes for thread safe in models

This commit is contained in:
Antonio de la Rosa 2018-06-05 04:08:53 +02:00
parent 50c030de53
commit e0a2c2cf57
2 changed files with 9 additions and 2 deletions

View file

@ -25,7 +25,10 @@ def insert(model, dict_values, external_agent=True):
query_error=False query_error=False
last_sql='' 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: try:

View file

@ -272,10 +272,14 @@ class WebModel:
self.name_field_id=name_field_id 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() 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 #The tables related with foreignkeyfield to this table
self.related=[] self.related=[]