diff --git a/CHANGES.md b/CHANGES.md index 12991c6f8..20c43ab60 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,6 +36,7 @@ - Fix problem in Firefox with scroll jumping when changin pages [#3052](https://github.com/penpot/penpot/issues/3052) - Fix nested frame interaction created flow in wrong frame [Taiga #5043](https://tree.taiga.io/project/penpot/issue/5043) - Font-Kerning does not work on Artboard Export to PNG/JPG/PDF [#3029](https://github.com/penpot/penpot/issues/3029) +- Fix manipulate duplicated project (delete, duplicate, rename, pin/unpin...) [Taiga #5027](https://tree.taiga.io/project/penpot/issue/5027) ### :heart: Community contributions by (Thank you!) - To @ondrejkonec: for contributing to the code with: diff --git a/backend/src/app/rpc/commands/management.clj b/backend/src/app/rpc/commands/management.clj index 515698118..0c5813a29 100644 --- a/backend/src/app/rpc/commands/management.clj +++ b/backend/src/app/rpc/commands/management.clj @@ -231,12 +231,13 @@ ;; Defer all constraints (db/exec-one! conn ["SET CONSTRAINTS ALL DEFERRED"]) - (let [project (db/get-by-id conn :project project-id) - + (let [project (-> (db/get-by-id conn :project project-id) + (assoc :is-pinned false)) + files (db/query conn :file - {:project-id (:id project) - :deleted-at nil} - {:columns [:id]}) + {:project-id (:id project) + :deleted-at nil} + {:columns [:id]}) project (cond-> project (string? name)