Simple fixes in show_form when no errors are showed
This commit is contained in:
parent
5f6b5e0e70
commit
029177587e
2 changed files with 5 additions and 3 deletions
|
|
@ -90,6 +90,7 @@ class SelectModelForm(SelectForm):
|
|||
|
||||
def __init__(self, name, value, model, field_name, field_value, field_parent=None):
|
||||
super(SelectModelForm, self).__init__(name, value)
|
||||
|
||||
try:
|
||||
self.default_value=int(self.default_value)
|
||||
except:
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ def show_form(post, arr_form, t, yes_error=True, modelform_tpl='forms/modelform.
|
|||
|
||||
s['csrf_token']=create_key_encrypt()
|
||||
|
||||
if yes_error==True:
|
||||
pass_values_to_form(post, arr_form, yes_error)
|
||||
|
||||
return t.load_template(modelform_tpl, forms=arr_form)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue