From 07fbe54c1a5410540d35518c24e1dc6569ea06e6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 06 2017 14:15:12 +0000 Subject: Only report custom field changes when they are some --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index a896428..923761a 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -3579,12 +3579,12 @@ def set_custom_key_value(session, issue, key, value): 'issue': issue.to_json(public=True, with_comments=False), })) - if value: + if updated and value: output = 'Custom field %s adjusted to %s' % (key.name, value) if old_value: output += ' (was: %s)' % old_value return output - else: + elif updated and old_value: return 'Custom field %s reset' % key.name