feat: Add intersex option for animals, fix bug
This commit is contained in:
parent
e6f5a42d15
commit
8d2d80c30e
@ -244,11 +244,14 @@ class AdoptionNotice(models.Model):
|
|||||||
return sexes
|
return sexes
|
||||||
|
|
||||||
def sex_code(self):
|
def sex_code(self):
|
||||||
|
# Treat Intersex as mixed in order to increase their visibility
|
||||||
if len(self.sexes) > 1:
|
if len(self.sexes) > 1:
|
||||||
return "mixed"
|
return "mixed"
|
||||||
elif self.sexes.pop() == SexChoices.MALE:
|
|
||||||
|
sex = self.sexes.pop()
|
||||||
|
if sex == SexChoices.MALE:
|
||||||
return "male"
|
return "male"
|
||||||
elif self.sexes.pop() == SexChoices.FEMALE:
|
elif sex == SexChoices.FEMALE:
|
||||||
return "female"
|
return "female"
|
||||||
else:
|
else:
|
||||||
return "mixed"
|
return "mixed"
|
||||||
|
Loading…
Reference in New Issue
Block a user