Merge pull request #15174 from ruchamahabal/event-last-update
fix: Delete Event Producer Last Update on trash event of Event Producer
This commit is contained in:
commit
fec76ba950
1 changed files with 5 additions and 0 deletions
|
|
@ -54,6 +54,11 @@ class EventProducer(Document):
|
|||
self.db_set('incoming_change', 0)
|
||||
self.reload()
|
||||
|
||||
def on_trash(self):
|
||||
last_update = frappe.db.get_value('Event Producer Last Update', dict(event_producer=self.name))
|
||||
if last_update:
|
||||
frappe.delete_doc('Event Producer Last Update', last_update)
|
||||
|
||||
def check_url(self):
|
||||
valid_url_schemes = ("http", "https")
|
||||
frappe.utils.validate_url(self.producer_url, throw=True, valid_schemes=valid_url_schemes)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue