fix: Tags getting fetched correctly in Get Supplier in RFQ (Request For Quotation) (#27499) (#27506)

* fix: Tags getting fetched correctly in Get Supplier in RFQ( Request For Quotation ) #26343

* fix: Linting issues

* fix: remove unnecessary caching

[skip ci]


Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
Co-authored-by: Ankush Menat <ankush@iwebnotes.in>

(cherry picked from commit 50fe23308acad58ab2db2056ea6dd163913725ef)
This commit is contained in:
Frappe PR Bot 2021-09-15 11:10:11 +05:30 committed by GitHub
parent 759f2b7920
commit 6e7945fbb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -394,12 +394,10 @@ def get_item_from_material_requests_based_on_supplier(source_name, target_doc =
@frappe.whitelist()
def get_supplier_tag():
if not frappe.cache().hget("Supplier", "Tags"):
filters = {"document_type": "Supplier"}
tags = list(set(tag.tag for tag in frappe.get_all("Tag Link", filters=filters, fields=["tag"]) if tag))
frappe.cache().hset("Supplier", "Tags", tags)
filters = {"document_type": "Supplier"}
tags = list(set(tag.tag for tag in frappe.get_all("Tag Link", filters=filters, fields=["tag"]) if tag))
return frappe.cache().hget("Supplier", "Tags")
return tags
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs