Skip to content
Snippets Groups Projects
Unverified Commit bc354c16 authored by Cam Saül's avatar Cam Saül
Browse files

Test fixes :wrench:

parent 07878592
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@
Field [{target1 :id} {:table_id t2, :raw_column_id raw-target1, :name "target1"}]
Field [{target2 :id} {:table_id t2, :raw_column_id raw-target2, :name "target2"}]]
(let [get-fields (fn [table-id]
(->> (db/select [Field :name :special_type :type/FK_target_field_id], :table_id table-id)
(->> (db/select [Field :name :special_type :fk_target_field_id], :table_id table-id)
(mapv tu/boolean-ids-and-timestamps)))]
[ ;; original list should not have any fks
(get-fields t1)
......
......@@ -270,7 +270,7 @@
{:special_type :type/FK, :fk_target_field_id true}]
(let [field-id (id :checkins :user_id)
get-special-type-and-fk-exists? (fn []
(into {} (-> (db/select-one [Field :special_type :type/FK_target_field_id], :id field-id)
(into {} (-> (db/select-one [Field :special_type :fk_target_field_id], :id field-id)
(update :fk_target_field_id #(db/exists? Field :id %)))))]
[ ;; FK should exist to start with
(get-special-type-and-fk-exists?)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment