Revision 76ba77c1 db/models.py
b/db/models.py | ||
---|---|---|
274 | 274 |
|
275 | 275 |
def _get_backend_id(self): |
276 | 276 |
"""Returns the backend id for this VM by prepending backend-prefix.""" |
277 |
if not self.id: |
|
278 |
raise VirtualMachine.InvalidBackendIdError("self.id is None") |
|
277 | 279 |
return '%s%s' % (settings.BACKEND_PREFIX_ID, str(self.id)) |
278 | 280 |
|
279 | 281 |
backend_id = property(_get_backend_id) |
Also available in: Unified diff