|
|
@ -8,7 +8,8 @@
|
|
|
|
(defn unique-attr-name-in-schema! [req]
|
|
|
|
(defn unique-attr-name-in-schema! [req]
|
|
|
|
(let [attr-uuid (get-in req [:params :uuid])
|
|
|
|
(let [attr-uuid (get-in req [:params :uuid])
|
|
|
|
name (get-in req [:params :name])
|
|
|
|
name (get-in req [:params :name])
|
|
|
|
matching-attr (db-attr/with-name! name)]
|
|
|
|
schema-uuid (get-in req [:params :schema])
|
|
|
|
|
|
|
|
matching-attr (db-attr/with-name-in-schema! name schema-uuid)]
|
|
|
|
(or (nil? matching-attr)
|
|
|
|
(or (nil? matching-attr)
|
|
|
|
(= attr-uuid (:uuid matching-attr)))))
|
|
|
|
(= attr-uuid (:uuid matching-attr)))))
|
|
|
|
|
|
|
|
|
|
|
|