From ad53d0b55a31c421a27f453e59d1615f5331847e Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 7 Jul 2023 15:17:48 +0200 Subject: [PATCH] :bug: Update project modified-at field after file import --- CHANGES.md | 1 + backend/src/app/rpc/commands/binfile.clj | 5 +++++ frontend/src/app/main/ui/dashboard/projects.cljs | 1 + 3 files changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index dcdea4cc8..8db3d6660 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -56,6 +56,7 @@ - Fix incorrect modified data on moving files on dashboard [Taiga #5530](https://tree.taiga.io/project/penpot/issue/5530) - Fix focus handling on comments edition [Taiga #5560](https://tree.taiga.io/project/penpot/issue/5560) - Fix incorrect fullname use on registring user after OIDC authentication [Taiga #5517](https://tree.taiga.io/project/penpot/issue/5517) +- Fix incorrect modified-at on project after import file [Taiga #5268](https://tree.taiga.io/project/penpot/issue/5268) ### :arrow_up: Deps updates diff --git a/backend/src/app/rpc/commands/binfile.clj b/backend/src/app/rpc/commands/binfile.clj index c962bc2f5..e485fa44b 100644 --- a/backend/src/app/rpc/commands/binfile.clj +++ b/backend/src/app/rpc/commands/binfile.clj @@ -929,5 +929,10 @@ ::input (:path file) ::project-id project-id ::ignore-index-errors? true))] + + (db/update! conn :project + {:modified-at (dt/now)} + {:id project-id}) + (rph/with-meta ids {::audit/props {:file nil :file-ids ids}})))) diff --git a/frontend/src/app/main/ui/dashboard/projects.cljs b/frontend/src/app/main/ui/dashboard/projects.cljs index eca9a2342..d0f5f3f99 100644 --- a/frontend/src/app/main/ui/dashboard/projects.cljs +++ b/frontend/src/app/main/ui/dashboard/projects.cljs @@ -255,6 +255,7 @@ (fn [] (st/emit! (dd/fetch-files {:project-id project-id}) (dd/fetch-recent-files (:id team)) + (dd/fetch-projects) (dd/clear-selected-files))))] (mf/with-effect