Skip to content
Snippets Groups Projects
Commit c0ac7386 authored by Dan Notestein's avatar Dan Notestein
Browse files

[DLN] fix hive sync crash when name = 'hive-'

parent 1b872f8e
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ class Community:
def validated_name(cls, name):
"""Perform basic validation on community name, then search for id."""
if (name[:5] == 'hive-'
and name[5] in ['1', '2', '3']
and len(name) > 5 and name[5] in ['1', '2', '3']
and re.match(r'^hive-[123]\d{4,6}$', name)):
return name
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment