Allow negative IDs (fix #145) (#206)

This commit is contained in:
Sargun Vohra 2016-06-04 06:18:45 -04:00 committed by Paul Hallett
parent ea12247133
commit 1890ad9512

View file

@ -34,7 +34,7 @@ class NameOrIdRetrieval():
pk (in this case ID) or by name
"""
idPattern = re.compile("^[0-9]+$")
idPattern = re.compile("^-?[0-9]+$")
namePattern = re.compile("^[0-9A-Za-z\-]+$")
def get_object(self):