Permalink
Browse files

Bug fixes and helper function

* Don't use the same data literal everywhere
* Useful helper function for converting codes
  • Loading branch information...
1 parent a05947d commit 98cdb35840c8a5fe84094c87ca733e1f17ae1447 Zack Maril committed Jul 16, 2014
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/echelon/ali.clj
View
@@ -1,4 +1,5 @@
-(ns echelon.ali)
+(ns echelon.ali
+ (:require [datomic.api :refer [tempid]]))
(def alis
{"ACC" "Accounting"
@@ -81,8 +82,11 @@
"WAS" "Waste (hazardous/solid/interstate/nuclear)"
"WEL" "Welfare"})
+(defn string->ali [code]
+ (keyword (str "lobbying.alis/" code)))
+
(def alis-attributes
(for [[code description] alis]
- {:db/id #db/id[:db.part/db]
+ {:db/id (tempid :db.part/user)
:db/ident (keyword (str "lobbying.alis/" code))
:db/doc (str "Code for activities relating to \"" description "\".")}))

0 comments on commit 98cdb35

Please sign in to comment.