mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Fix the end_date value to return the correct value
This commit is contained in:
@@ -35,7 +35,7 @@ class EVEPlayerCharacterEmploymentHistory(models.Model):
|
|||||||
@property
|
@property
|
||||||
def end_date(self):
|
def end_date(self):
|
||||||
if self.character.employmenthistory.filter(record_id__gt=self.record_id).count():
|
if self.character.employmenthistory.filter(record_id__gt=self.record_id).count():
|
||||||
return self.character.employmenthistory.filter(record_id__gt=self.record_id)[0].start_date
|
return self.character.employmenthistory.filter(record_id__gt=self.record_id).order_by('record_id')[0].start_date
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user