Fixes in usermodel, fixed errors in webmodel, fixes in lists documentation
This commit is contained in:
parent
6c9d115579
commit
db23fb230b
3 changed files with 8 additions and 8 deletions
|
|
@ -48,7 +48,7 @@ class UserModel(WebModel):
|
|||
|
||||
repeat_password.label=I18n.lang('common', 'repeat_password', 'Repeat Password')
|
||||
|
||||
repeat_password.field=self.fields['password']
|
||||
repeat_password.field=self.fields[self.password_field]
|
||||
|
||||
self.create_form_after(self.password_field, repeat_password)
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ class UserModel(WebModel):
|
|||
|
||||
if self.username_field in dict_values:
|
||||
|
||||
self.conditions=['WHERE username=%s AND '+self.name_field_id+'!=%s', [dict_values[self.username_field], get_id]]
|
||||
self.conditions=['WHERE '+self.username_field+'=%s AND '+self.name_field_id+'!=%s', [dict_values[self.username_field], get_id]]
|
||||
|
||||
if self.select_count()>0:
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ class UserModel(WebModel):
|
|||
|
||||
if self.email_field in dict_values:
|
||||
|
||||
self.conditions=['WHERE email=%s AND '+self.name_field_id+'!=%s', [dict_values[self.email_field], get_id]]
|
||||
self.conditions=['WHERE '+self.email_field+'=%s AND '+self.name_field_id+'!=%s', [dict_values[self.email_field], get_id]]
|
||||
|
||||
if self.select_count()>0:
|
||||
|
||||
|
|
|
|||
|
|
@ -609,8 +609,8 @@ class WebModel:
|
|||
else:
|
||||
return False
|
||||
|
||||
except:
|
||||
self.query_error='Cannot insert the new row '+sys.exc_info()[0]
|
||||
except Exception as e:
|
||||
self.query_error='Cannot insert the new row '+str(e)
|
||||
#print(sys.exc_info()[0])
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue