Revision 8f66553c
Fixed problems with previous fix
crm/robocrm/models.py | ||
---|---|---|
96 | 96 |
type = models.CharField(max_length=30) |
97 | 97 |
tstart = models.DateTimeField() |
98 | 98 |
tend = models.DateTimeField() |
99 |
user = models.ForeignKey('RoboUser') |
|
99 |
user = models.ForeignKey('RoboUser', null=True)
|
|
100 | 100 |
succ = models.BooleanField(default=False) |
101 | 101 |
imgurl = models.URLField() |
102 | 102 |
machine = models.ForeignKey('Machine') |
... | ... | |
104 | 104 |
matuse = models.TextField() |
105 | 105 |
|
106 | 106 |
def __unicode__(self): |
107 |
return u'%s %s %s'%(self.type, self.user.user.username, self.succ) |
|
107 |
return u'%s %s %s'%(self.type, |
|
108 |
self.user.user.username if self.user else 'unknown', self.succ) |
|
108 | 109 |
|
109 | 110 |
# Project Model |
110 | 111 |
class Project(models.Model): |
Also available in: Unified diff