From f87583016e9141673afd0fc39da20f175e367c12 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 23 Mar 2020 09:13:14 +0000 Subject: [PATCH] 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. --- guix-data-service/model/lint-warning-message.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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