Fix type issues with the location ids

On one code path, they were handled as numbers, whereas elsewhere they were
handled as strings. This led to the package-metadata code trying to insert
duplicate entries.

Instead, just handle them as strings everywhere.
This commit is contained in:
Christopher Baines 2019-05-14 07:55:17 +01:00
parent 721d21ed4d
commit 28c2d46081
3 changed files with 20 additions and 10 deletions

View file

@ -34,6 +34,18 @@
conn
(list mock-inferior-package-foo))
((x) (string? x))))
#:always-rollback? #t))
(with-postgresql-transaction
conn
(lambda (conn)
(test-equal "inferior-packages->package-metadata-ids"
(inferior-packages->package-metadata-ids
conn
(list mock-inferior-package-foo))
(inferior-packages->package-metadata-ids
conn
(list mock-inferior-package-foo)))
#:always-rollback? #t))))))
(test-end)