Commit 55152ca0 by aa.gusti

penambhan fungsi pada user_area

1 parent c2adf1ec
...@@ -23,6 +23,9 @@ class UserArea(DefaultModel, Base): ...@@ -23,6 +23,9 @@ class UserArea(DefaultModel, Base):
if user and user.id: if user and user.id:
return True return True
if not desa_id and not desa_kd:
raise Exception("parameter desa_id atau desa_kd wajib dikirim")
if desa_id: if desa_id:
rs = cls.query().filter(cls.user_id == user_id, cls.desa_id == desa_id) rs = cls.query().filter(cls.user_id == user_id, cls.desa_id == desa_id)
if rs and rs.id: if rs and rs.id:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!