Project

General

Profile

Revision 8f66553c

ID8f66553c01e324db1bb443422368ed1dd6bab503
Parent e4313fa2
Child 911e4e11

Added by root about 10 years ago

Fixed problems with previous fix

View differences:

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