mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 15:11:38 +02:00
🐛 Fix name generation and handling on creating objects (files, tokens, ...) (#5745)
* ✨ Update function implementation * ✨ Add tests for a new function implementation * ✨ Update function usages according to new signature * ✨ Update docstrings * ✨ Use simpler assertion * 💄 Replace concat with cons on name-seq * 🐛 Fix incorrect error handling on legacy workspace redirect --------- Co-authored-by: Andrey Fedorov <oran9e.red@gmail.com>
This commit is contained in:
parent
bce30eb522
commit
315b389a66
10 changed files with 144 additions and 58 deletions
|
@ -1071,7 +1071,7 @@
|
|||
groups (d/group-by #(first (cfh/split-path (:path %))) assets)
|
||||
;; If there is a group called as the generic-name we have to preserve it
|
||||
unames (into #{} (keep str) (keys groups))
|
||||
groups (rename-keys groups {generic-name (cfh/generate-unique-name unames generic-name)})
|
||||
groups (rename-keys groups {generic-name (cfh/generate-unique-name generic-name unames)})
|
||||
|
||||
;; Split large groups in chunks of max-group-size elements
|
||||
groups (loop [groups (seq groups)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue