Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug fixes and helper function

* Don't use the same data literal everywhere
* Useful helper function for converting codes
  • Loading branch information...
commit 98cdb35840c8a5fe84094c87ca733e1f17ae1447 1 parent a05947d
@zmaril zmaril authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/echelon/ali.clj
View
8 src/echelon/ali.clj
@@ -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 "\".")}))
Please sign in to comment.
Something went wrong with that request. Please try again.