fix incorrect usage of add_field_errors in schema.py

This commit is contained in:
ahmadbilalkhalid 2019-11-21 16:46:59 +05:00
parent c8b67c5c50
commit 44fc8d4615
1 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ class DeleteOTPSchema(DataRequiredSchema):
def admin_realm_validation(self):
if self.admin_realm.value != decouple.config("ADMIN_REALM"):
self.add_field_errors(
self.add_error(
"Admin must be from {} realm".format(decouple.config("ADMIN_REALM"))
)
@ -233,7 +233,7 @@ class ListAccountSchema(DataRequiredSchema):
def admin_realm_validation(self):
if self.admin_realm.value != decouple.config("ADMIN_REALM"):
self.add_field_errors(
self.add_error(
"Admin must be from {} realm".format(decouple.config("ADMIN_REALM"))
)