diff options
Diffstat (limited to 'lib/csapi/pushrules.cpp')
-rw-r--r-- | lib/csapi/pushrules.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/csapi/pushrules.cpp b/lib/csapi/pushrules.cpp index eca46247..807f1d0f 100644 --- a/lib/csapi/pushrules.cpp +++ b/lib/csapi/pushrules.cpp @@ -99,10 +99,8 @@ DeletePushRuleJob::DeletePushRuleJob(const QString& scope, const QString& kind, BaseJob::Query queryToSetPushRule(const QString& before, const QString& after) { BaseJob::Query _q; - if (!before.isEmpty()) - _q.addQueryItem("before", before); - if (!after.isEmpty()) - _q.addQueryItem("after", after); + addToQuery<IfNotEmpty>(_q, "before", before); + addToQuery<IfNotEmpty>(_q, "after", after); return _q; } |