Commit 03e7de22 authored by Patrick's avatar Patrick
Browse files

Check if field price_list_multiplier exists before referencing it

parent 8c338f19
......@@ -65,7 +65,7 @@ class UserDataForm(forms.ModelForm):
if user is not None:
if initial_username != user.username:
self.add_error(username_field_name, user_error2)
if self.instance.id is not None:
if self.instance.id is not None and "price_list_multiplier" in self.cleaned_data:
if self.instance.delivery_point is not None \
and self.instance.delivery_point.customer_responsible is not None \
and self.cleaned_data["price_list_multiplier"] != DECIMAL_ONE:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment