Revision e0657267 crm/robocrm/models.py

View differences:

crm/robocrm/models.py
88 88
                                  choices=STATUS_CHOICES,
89 89
                                  default=GOOD)
90 90
  def __unicode__(self):
91
    return self.user.username;
91
    return self.user.username
92 92

  
93 93
# needed for Django Auth model
94 94
def create_roboclub_user(sender, instance, created, **kwargs):
......
106 106
  succ = models.BooleanField(default=False)
107 107
  imgurl = models.URLField()
108 108
  machine = models.ForeignKey('Machine')
109
  project = models.ForeignKey('Project')
109
  project = models.ForeignKey('Project', null=True)
110 110
  matuse = models.TextField()
111 111
  
112 112
  def __unicode__(self):
113
    return u'%s %s %s' (self.type, self.user.username, self.succ)
113
    return u'%s %s %s'%(self.type, self.user.user.username, self.succ)
114 114

  
115 115
# Project Model
116 116
class Project(models.Model):

Also available in: Unified diff