aboutsummaryrefslogtreecommitdiffstats
path: root/src/account
diff options
context:
space:
mode:
Diffstat (limited to 'src/account')
-rw-r--r--src/account/migrations/0006_auto_20201109_1947.py23
-rw-r--r--src/account/models.py6
2 files changed, 26 insertions, 3 deletions
diff --git a/src/account/migrations/0006_auto_20201109_1947.py b/src/account/migrations/0006_auto_20201109_1947.py
new file mode 100644
index 0000000..d08c426
--- /dev/null
+++ b/src/account/migrations/0006_auto_20201109_1947.py
@@ -0,0 +1,23 @@
+# Generated by Django 2.2 on 2020-11-09 19:47
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('account', '0005_auto_20200723_2100'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='userprofile',
+ name='full_name',
+ field=models.CharField(blank=True, default='', max_length=100, null=True),
+ ),
+ migrations.AlterField(
+ model_name='userprofile',
+ name='jira_url',
+ field=models.CharField(blank=True, default='', max_length=100, null=True),
+ ),
+ ]
diff --git a/src/account/models.py b/src/account/models.py
index 2d0293f..40de4d8 100644
--- a/src/account/models.py
+++ b/src/account/models.py
@@ -80,12 +80,12 @@ class VlanManager(models.Model):
# if they use QinQ or a vxlan overlay, for example
allow_overlapping = models.BooleanField()
- def get_vlan(self, count=1):
+ def get_vlans(self, count=1):
"""
- Return the ID of available vlans, but does not reserve them.
+ Return the IDs of available vlans as a list[int], but does not reserve them.
Will throw index exception if not enough vlans are available.
- If count == 1, the return value is an int. Otherwise, it is a list of ints.
+ Always returns a list of ints
"""
allocated = []
vlans = json.loads(self.vlans)