fix things with empty dorodata

master
Josha von Gizycki 5 years ago
parent 585aafd306
commit 55b308fb2d

@ -43,7 +43,8 @@
(defn lines->entries [lines]
(var entries @[])
(loop [line :in lines]
(loop [line :in lines
:when (> (length line) 0)]
(let [[key content] (string/split ":" line)
kwkey (keyword key)]
(when (or (= "id" key)
@ -85,8 +86,11 @@
(readline))
(defn new-id []
(inc (max ;(map (fn [e] (scan-number (e :id)))
(load-entries)))))
(inc (or (max ;(map (fn [e]
(scan-number
(get e :id "0")))
(load-entries)))
0)))
(defn add []
(-> (load-entries)

Loading…
Cancel
Save