Skip to content
Snippets Groups Projects
Commit ba5b0782 authored by Brian Moe's avatar Brian Moe
Browse files

Fixed getByGraceid -- graceid prefix misinterpreted.

parent ae8c7943
No related branches found
No related tags found
No related merge requests found
......@@ -132,13 +132,13 @@ class Event(models.Model):
@classmethod
def getByGraceid(cls, id):
e = cls.objects.get(id=int(id[1:]))
if (id[0] == "T") and (e.group.name != "Test"):
raise cls.DoesNotExist()
if (id[0] == "T") and (e.group.name == "Test"):
return e
if (id[0] == "H") and (e.analysisType == "HWINJ"):
raise cls.DoesNotExist()
if (id[0] != "G"):
raise cls.DoesNotExist()
return e
return e
if (id[0] == "G"):
return e
raise cls.DoesNotExist()
def __unicode__(self):
return self.graceid()
......
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