fix(patch): set update_modified to False while setting issue/opportunity metrics (#24073)

This commit is contained in:
Rucha Mahabal 2020-12-07 10:41:05 +05:30 committed by GitHub
parent 6c35767995
commit 063be69b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ def execute():
'response_by_variance': response_by_variance,
'resolution_by_variance': resolution_by_variance,
'first_response_time': mins_to_first_response
})
}, update_modified=False)
# commit after every 100 updates
count += 1
if count%100 == 0:
@ -44,7 +44,7 @@ def execute():
count = 0
for entry in opportunities:
mins_to_first_response = convert_to_seconds(entry.mins_to_first_response, 'Minutes')
frappe.db.set_value('Opportunity', entry.name, 'first_response_time', mins_to_first_response)
frappe.db.set_value('Opportunity', entry.name, 'first_response_time', mins_to_first_response, update_modified=False)
# commit after every 100 updates
count += 1
if count%100 == 0: