Skip to content

Commit

Permalink
Merge pull request #41 from HumanDynamics/bug/fix_observed_id
Browse files Browse the repository at this point in the history
Observed Id should accept id > 32000. Closes #40
  • Loading branch information
OrenLederman authored May 15, 2018
2 parents 28d90aa + 827fe02 commit 0f47f68
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions openbadge-server/openbadge/migrations/0005_auto_20180511_2151.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('openbadge', '0004_ids_and_beacons'),
]

operations = [
migrations.AlterField(
model_name='beacon',
name='observed_id',
field=models.PositiveIntegerField(default=0),
),
migrations.AlterField(
model_name='member',
name='observed_id',
field=models.PositiveIntegerField(default=0),
),
]
4 changes: 2 additions & 2 deletions openbadge-server/openbadge/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Member(BaseModelMinimal):
email = models.EmailField(null=True, blank=True)
name = models.CharField(max_length=64)
badge = models.CharField(max_length=64, unique=True)
observed_id = models.PositiveSmallIntegerField(default=0)
observed_id = models.PositiveIntegerField(default=0)
active = models.BooleanField(default=True)
comments = models.CharField(max_length=240, blank=True, default='')

Expand Down Expand Up @@ -339,7 +339,7 @@ class Beacon(BaseModelMinimal):
id = models.PositiveSmallIntegerField(primary_key=True, editable=False, unique=True, blank=True, validators=[MaxValueValidator(32000), MinValueValidator(16000)])
name = models.CharField(max_length=64)
badge = models.CharField(max_length=64, unique=True)
observed_id = models.PositiveSmallIntegerField(default=0)
observed_id = models.PositiveIntegerField(default=0)
active = models.BooleanField(default=True)
comments = models.CharField(max_length=240, blank = True ,default='')

Expand Down

0 comments on commit 0f47f68

Please sign in to comment.