diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-08 23:24:51 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-08 23:24:51 +0900 |
commit | 6767cb8eccea7b74531f59f165a28afa0bec61f4 (patch) | |
tree | ea3ffe2fc07d3a9b7b48ee2ab37b0fe594f1af85 /lib/csapi/pushrules.cpp | |
parent | 4b1b308f28bdaef598a5dfc249d7af6a0346b367 (diff) | |
download | libquotient-6767cb8eccea7b74531f59f165a28afa0bec61f4.tar.gz libquotient-6767cb8eccea7b74531f59f165a28afa0bec61f4.zip |
csapi: Fix boolean query parameters incorrectly passed
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; } |