🐛 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:
Andrey Antukh 2025-02-03 12:49:56 +01:00 committed by GitHub
parent bce30eb522
commit 315b389a66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 144 additions and 58 deletions

View file

@ -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))