aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/location.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-05-14 07:55:17 +0100
committerChristopher Baines <mail@cbaines.net>2019-05-14 07:55:17 +0100
commit28c2d4608149b55d7547eab563e688814f3d7254 (patch)
tree8cf29d257f2fddd577b775aa44313cea9114ebb5 /guix-data-service/model/location.scm
parent721d21ed4dfb09ea8cc6d2f5c1bdf6cd515f383e (diff)
downloaddata-service-28c2d4608149b55d7547eab563e688814f3d7254.tar
data-service-28c2d4608149b55d7547eab563e688814f3d7254.tar.gz
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.
Diffstat (limited to 'guix-data-service/model/location.scm')
-rw-r--r--guix-data-service/model/location.scm16
1 files changed, 7 insertions, 9 deletions
diff --git a/guix-data-service/model/location.scm b/guix-data-service/model/location.scm
index 1a01b9a..9850377 100644
--- a/guix-data-service/model/location.scm
+++ b/guix-data-service/model/location.scm
@@ -42,13 +42,11 @@
(list file
(number->string line)
(number->string column)))
- (((id))
- (string->number id))
+ (((id)) id)
(()
- (string->number
- (caar
- (exec-query conn
- insert-location
- (list file
- (number->string line)
- (number->string column))))))))))
+ (caar
+ (exec-query conn
+ insert-location
+ (list file
+ (number->string line)
+ (number->string column)))))))))