Compare View

switch
from
...
to
 
Commits (2)
src/core/pyros_django/majordome/agent/Agent.py
@@ -3519,28 +3519,7 @@ class Agent: @@ -3519,28 +3519,7 @@ class Agent:
3519 return ephem_target 3519 return ephem_target
3520 3520
3521 3521
3522 - def get_period(self) -> dict:  
3523 - """Returns a dictionary of the period in various formats  
3524 -  
3525 - Returns:  
3526 - Dictionay of following items:  
3527 -  
3528 - * id: integer of the period number  
3529 - * Pxxx: string of the period symbol for file names  
3530 - """  
3531 - period_dict = {}  
3532 - operiod = Period.objects.exploitation_period()  
3533 - if operiod == None:  
3534 - log.info("No period valid in the database")  
3535 - raise Exception  
3536 - period_dict['id'] = int(operiod.id)  
3537 - period_id = str(operiod.id)  
3538 - if len(str(operiod.id)) < 3:  
3539 - while len(period_id) < 3:  
3540 - period_id = "0" + period_id  
3541 - period_id = "P" + period_id  
3542 - period_dict['Pxxx'] = period_id  
3543 - return period_dict 3522 +
3544 """ 3523 """
3545 ================================================================= 3524 =================================================================
3546 MAIN 3525 MAIN
src/core/pyros_django/user_mgmt/models.py
@@ -423,7 +423,7 @@ class Period(models.Model): @@ -423,7 +423,7 @@ class Period(models.Model):
423 today = timezone.now().date() 423 today = timezone.now().date()
424 return today >= self.notification_start_date 424 return today >= self.notification_start_date
425 425
426 - def get_period_id_as_str(self) -> str: 426 + def get_id_as_str(self) -> str:
427 """ 427 """
428 Return period_id as P+period_id 428 Return period_id as P+period_id
429 429