Commit 660e0582 authored by Ryan Herbert's avatar Ryan Herbert Committed by Mathieu Giraud,, polymorphism

Follows 61ff3343.
See #2282.
parent 7a274ccc
......@@ -7,7 +7,7 @@ class SampleSet(object):
return self.type
def get_type_display(self):
return 'set' if self.type == defs.SET_TYPE_GENERIC else self.type
return self.type
def __getitem__(self, key):
return getattr(self, key, None)
class Generic(SampleSet):
def __init__(self, type):
super(Generic, self).__init__(type)
def get_type_display(self):
return 'set'
from enum import Enum
class FactoryEnum(Enum):
generic = SampleSet
generic = Generic
patient = Patient
run = Run
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment