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