Browse Source

condition for circular api

master
venkataakhil 1 year ago
parent
commit
9f9d83b2d7
  1. 2
      smart_service/apis/addon_api.py

2
smart_service/apis/addon_api.py

@ -44,7 +44,7 @@ def addon(args=None):
try:
if args == "circular":
api = frappe.db.sql(
'''SELECT name,title,status,description,circular_image as FileUrl,valid_till from {}.tabCircular WHERE valid_till >='{}' '''.format(
'''SELECT name,title,status,description,circular_image as FileUrl,valid_till from {}.tabCircular WHERE valid_till >='{}' or valid_till is null '''.format(
current_db_name, frappe.utils.today()), as_dict=True)
for i in api:
if i["status"] == "Active":

Loading…
Cancel
Save