fix: removed unncessary changes

This commit is contained in:
Daizy Modi 2022-12-15 18:02:14 +05:30
parent 4bfe2ea572
commit 56f3ac15d8
3 changed files with 15 additions and 10 deletions

View File

@ -245,9 +245,11 @@ def _get_employee_from_user(user):
def add_agent_assignment(args):
doc = frappe.get_cached_doc(args.get("doctype"), args.get("name"))
doctype = args.get("doctype")
docname = args.get("name")
for assign_to in args.get("assign_to"):
if not frappe.has_permission(doc=doc, user=assign_to):
add_docshare(doc.doctype, doc.name, assign_to, flags={"ignore_share_permission": True})
if not frappe.has_permission(doctype=doctype, doc=docname, user=assign_to):
add_docshare(doctype, docname, assign_to, flags={"ignore_share_permission": True})
add_assignment(args)

View File

@ -5,12 +5,14 @@
{% endblock%}
{% block page_content %}
{%- set alert_class = 'alert-success' if success else 'alert-danger' -%}
<div class="alert {{ alert_class }}">
{% if success==True %}
{% if success==True %}
<div class="alert alert-success">
{{ _("Your email has been verified and your appointment has been scheduled") }}
{% else %}
</div>
{% else %}
<div class="alert alert-danger">
{{ _("Verification failed please check the link") }}
{% endif %}
</div>
</div>
{% endif %}
{% endblock%}

View File

@ -14,6 +14,7 @@ def get_context(context):
appointment = frappe.get_doc("Appointment", appointment_name)
appointment.set_verified(email)
context.success = True
return context
else:
context.success = False
return context
return context