fix instance property creation and single links

integration-tests
Josha von Gizycki 6 years ago
parent c8047eaa42
commit 32c373b5d6

@ -52,7 +52,8 @@
:attr_uuid (:uuid attribute)
:prop_uuid (neo4j/uuid)
:value value
:created_at now}])]
:created_at now
:updated_at now}])]
(apply neo4j/exec-queries!
(concat [instance-tuple]
prop-tuples))))
@ -130,8 +131,7 @@
(neo4j/defquery create-link
"MATCH (i:instance {uuid:{from}}),
(u:user {uuid:{by}}),
(t:instance)
WHERE t.uuid = {target}
(t:instance {uuid:{target}})
CREATE (l:link {uuid:{uuid}})-[:created_by]->(u)
SET l.created_at = {created_at},
l.name = {name}

@ -11,6 +11,7 @@
:instances {:label "Instances"
:widget :mselect
:size (min 40 (count instances))
:from-req #(if (vector? %) % [%])
:options (map #(vector (:name %)
(:uuid %))
instances)}}})

@ -63,7 +63,7 @@
render-fn (case type
"date" #(str (prettify-dt %))
"markdown" md/md-to-html-string
:else #(str "<p>" % "</p>"))]]
#(str "<p>" % "</p>"))]]
(list [:h3 (h (:name attr))]
[:div {:class (str "instance-content "
"attr-type-" type)}

Loading…
Cancel
Save