Revision 2f998a37 snf-cyclades-app/synnefo/db/models.py
b/snf-cyclades-app/synnefo/db/models.py | ||
---|---|---|
715 | 715 |
last = cls.objects.order_by('-index')[0] |
716 | 716 |
index = last.index + 1 |
717 | 717 |
except IndexError: |
718 |
index = 1
|
|
718 |
index = 0
|
|
719 | 719 |
|
720 | 720 |
if index <= cls.max_index: |
721 | 721 |
return cls.objects.create(index=index, |
Also available in: Unified diff