Show new label name on update

This commit is contained in:
Ross Scroggs
2024-03-11 17:04:05 -07:00
parent abe1d5381d
commit bdc330405e

View File

@@ -65944,10 +65944,10 @@ def updateLabelSettings(users):
try:
for label in labels['labels']:
if label['name'].lower() == label_name_lower:
callGAPI(gmail.users().labels(), 'patch',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT],
userId='me', id=label['id'], body=body, fields='')
entityActionPerformed([Ent.USER, user, Ent.LABEL, label_name], i, count)
result = callGAPI(gmail.users().labels(), 'patch',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT],
userId='me', id=label['id'], body=body, fields='name')
entityActionPerformed([Ent.USER, user, Ent.LABEL, result['name']], i, count)
break
else:
entityActionFailedWarning([Ent.USER, user, Ent.LABEL, label_name], Msg.DOES_NOT_EXIST, i, count)