Commit 20c336b5 by aagusti

perbaikan register

1 parent 89ac5da4
...@@ -331,7 +331,8 @@ class Registrasi(BaseView): ...@@ -331,7 +331,8 @@ class Registrasi(BaseView):
"idcard"] "idcard"]
for f in fields: for f in fields:
d[f] = hasattr(partner, f) and getattr(partner, f) or "" d[f] = hasattr(partner, f) and getattr(partner, f) or ""
if "idcard" in d and d["idcard"]: if "idcard" in d :
if d["idcard"]:
filename = d["idcard"] filename = d["idcard"]
preview_url = "/".join( preview_url = "/".join(
[self.home, partner_idcard_folder, filename]) [self.home, partner_idcard_folder, filename])
...@@ -339,6 +340,8 @@ class Registrasi(BaseView): ...@@ -339,6 +340,8 @@ class Registrasi(BaseView):
"filename": filename, "filename": filename,
"preview_url": preview_url "preview_url": preview_url
} }
else:
d.pop("idcard")
return d return d
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!