+import logging
+
from django.db import models
from django.db.models.signals import pre_save
from htsworkflow.frontend.experiments.models import FlowCell
-import uuid
+try:
+ import uuid
+except ImportError, e:
+ # Some systems are using python 2.4, which doesn't have uuid
+ # this is a stub
+ logging.warning('Real uuid is not available, initializing fake uuid module')
+ class uuid:
+ def uuid1(self):
+ self.hex = None
+ return self
def _assign_uuid(sender, instance, **kwargs):
"""
storage_devices = models.ManyToManyField(Item)
def __unicode__(self):
- return u"%s: %s" % (str(self.flowcell), ', '.join([ str(s) for s in self.storage_devices.iterator() ]))
\ No newline at end of file
+ return u"%s: %s" % (str(self.flowcell), ', '.join([ str(s) for s in self.storage_devices.iterator() ]))
+