fix: updating existing assignment

This commit is contained in:
Jannat Patel
2021-12-23 20:30:31 +05:30
parent 6e3de21f6e
commit 40985da9ca
2 changed files with 4 additions and 4 deletions

View File

@@ -16,9 +16,9 @@ def upload_assignment(assignment, lesson, identifier):
"user": frappe.session.user, "user": frappe.session.user,
"id": identifier "id": identifier
} }
lesson_work = frappe.db.exists(args) if frappe.db.exists(args):
if lesson_work: del args["doctype"]
frappe.db.set_value("Lesson Assignment", lesson_work[0], "assignment", assignment) frappe.db.set_value("Lesson Assignment", args, "assignment", assignment)
else: else:
args.update({"assignment": assignment}) args.update({"assignment": assignment})
lesson_work = frappe.get_doc(args) lesson_work = frappe.get_doc(args)

View File

@@ -244,7 +244,7 @@
{% endif %} {% endif %}
{% if member.mobile_no and not member.hide_private %} {% if member.mobile_no and not member.hide_private %}
<a class="button-links mobile-no" href="tel:{{ member.mobile_no }}" > <a class="button-links" href="tel:{{ member.mobile_no }}" >
<img src="/assets/school/icons/call.svg"> {{ member.mobile_no }} <img src="/assets/school/icons/call.svg"> {{ member.mobile_no }}
</a> </a>
{% endif %} {% endif %}