Revision cfd70896
b/snf-cyclades-app/synnefo/db/models.py | ||
---|---|---|
69 | 69 |
return u'C%dR%dD%d' % (self.cpu, self.ram, self.disk) |
70 | 70 |
|
71 | 71 |
def __unicode__(self): |
72 |
return self.name
|
|
72 |
return str(self.id)
|
|
73 | 73 |
|
74 | 74 |
|
75 | 75 |
class Backend(models.Model): |
... | ... | |
358 | 358 |
get_latest_by = 'created' |
359 | 359 |
|
360 | 360 |
def __unicode__(self): |
361 |
return self.name + "(id=" + str(self.id) + ")"
|
|
361 |
return str(self.id)
|
|
362 | 362 |
|
363 | 363 |
|
364 | 364 |
class VirtualMachineMetadata(models.Model): |
... | ... | |
429 | 429 |
|
430 | 430 |
objects = ForUpdateManager() |
431 | 431 |
|
432 |
def __unicode__(self): |
|
433 |
return str(self.id) |
|
434 |
|
|
432 | 435 |
class InvalidBackendIdError(Exception): |
433 | 436 |
def __init__(self, value): |
434 | 437 |
self.value = value |
... | ... | |
466 | 469 |
""" |
467 | 470 |
return getattr(snf_settings, self.type + '_TAGS') |
468 | 471 |
|
469 |
def __unicode__(self): |
|
470 |
return self.name + "(id=" + str(self.id) + ")" |
|
471 |
|
|
472 | 472 |
@transaction.commit_on_success |
473 | 473 |
def update_state(self): |
474 | 474 |
"""Update state of the Network. |
Also available in: Unified diff