Commit edc2e08b authored by Daniel W Bond's avatar Daniel W Bond
Browse files

floor now optional field for student

parent e35b7f8c
......@@ -88,7 +88,7 @@ class Student(TimeStampedModel):
privacy = models.CharField(max_length=100, choices=PRIVACY_CHOICES, default=FLOOR)
room = models.ForeignKey(Room)
room = models.ForeignKey(Room, null=True, blank=True)
clas = models.ForeignKey(Class)
major = models.ForeignKey('Major')
......@@ -99,12 +99,18 @@ class Student(TimeStampedModel):
objects = StudentManager()
def get_floor(self):
floor =
return floor
except AttributeError:
return None
def get_building(self):
building =
return building
except AttributeError:
return None
def profile_image_url(self):
fb_uid = SocialAccount.objects.filter(, provider='facebook')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment