Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion girderformindlogger/api/v1/applet_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,19 @@ def getCategories(self):
.errorResponse('Write access was denied for this applet.', 403)
)
def checkAppletName(self, applet, name):
appletName = name.strip().replace("(", "\\(").replace(")", "\\)")
words = name.strip().split(' ')

appletName = ''
for word in words:
if not word:
continue

if len(appletName):
appletName += ' +'

appletName += word

appletName = appletName.replace("(", "\\(").replace(")", "\\)")
existing = self._model.findOne({
'name': {
'$regex': f'^{appletName}$',
Expand Down