mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 10:01:40 +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
|
@ -44,9 +44,9 @@
|
|||
(dsh/lookup-page state page-id)
|
||||
(dsh/lookup-page state))
|
||||
|
||||
flows (get page :flows)
|
||||
unames (cfh/get-used-names (vals flows))
|
||||
name (or name (cfh/generate-unique-name unames "Flow 1"))
|
||||
unames (cfh/get-used-names (vals (get page :flows)))
|
||||
name (or name
|
||||
(cfh/generate-unique-name "Flow" unames :immediate-suffix? true))
|
||||
|
||||
flow-id (or flow-id (uuid/next))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue