aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/lint-warning-message.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-03-23 09:13:14 +0000
committerChristopher Baines <mail@cbaines.net>2020-03-23 09:13:14 +0000
commitf87583016e9141673afd0fc39da20f175e367c12 (patch)
treef120a2a4435ab27c84ba83962375bb99dc60481f /guix-data-service/model/lint-warning-message.scm
parente18f3861f84b74d7b7c4a3466fdd5c1e2ee01496 (diff)
downloaddata-service-f87583016e9141673afd0fc39da20f175e367c12.tar
data-service-f87583016e9141673afd0fc39da20f175e367c12.tar.gz
Sort the lint-warning-message-ids when querying
This might solve errors where the Guix Data Service is trying to insert a lint_warning_message_set that already exists.
Diffstat (limited to 'guix-data-service/model/lint-warning-message.scm')
-rw-r--r--guix-data-service/model/lint-warning-message.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix-data-service/model/lint-warning-message.scm b/guix-data-service/model/lint-warning-message.scm
index 50c9f77..20a5d68 100644
--- a/guix-data-service/model/lint-warning-message.scm
+++ b/guix-data-service/model/lint-warning-message.scm
@@ -64,7 +64,8 @@
(string-append
"SELECT id FROM lint_warning_message_sets "
"WHERE message_ids = ARRAY["
- (string-join (map number->string lint-warning-message-ids) ", ")
+ (string-join (map number->string
+ (sort lint-warning-message-ids <)) ", ")
"]"))))
(string->number