gbmodel/model_sqlalchemy.py
def date_error(self, params):
        """
        This method handles error message for inserting dates
        Input: parameter of dates (start/end dates for midterm/final)
        Output: error message
        """
        error_msg = None
        for i in params:
            if params[i]:
                params[i] = params[i].replace('-', '')
            else:
                params[i] = None
        mid = self.check_dates(params['midterm_start'], params['midterm_end'])
        final = self.check_dates(params['final_start'], params['final_end'])
        if mid == 2:
            error_msg = "Please fill out both start and end dates for the Midterm dates"
            return error_msg
        if final == 2:
            error_msg = "Please fill out both start and end dates for the Final dates"
            return error_msg
        elif mid == 1 or final == 1:
            error_msg = "Please choose an end date that starts after the start date"
            return error_msg
        return error_msg

        This method handles error message for inserting dates
        Input: parameter of dates (start/end dates for midterm/final)
        Output: error message
        
This method handles error message for inserting dates
Input: parameter of dates (start/end dates for midterm/final)
Output: error message
This method handles error message for inserting dates Input : parameter of dates ( start / end dates for midterm / final ) Output : error message
def date_error(self, params):
        error_msg = None
        for i in params:
            if params[i]:
                params[i] = params[i].replace('-', '')
            else:
                params[i] = None
        mid = self.check_dates(params['midterm_start'], params['midterm_end'])
        final = self.check_dates(params['final_start'], params['final_end'])
        if mid == 2:
            error_msg = "Please fill out both start and end dates for the Midterm dates"
            return error_msg
        if final == 2:
            error_msg = "Please fill out both start and end dates for the Final dates"
            return error_msg
        elif mid == 1 or final == 1:
            error_msg = "Please choose an end date that starts after the start date"
            return error_msg
        return error_msg
def date_error ( self , params ) : error_msg = None for i in params : if params [ i ] : params [ i ] = params [ i ] . replace ( '-' , '' ) else : params [ i ] = None mid = self . check_dates ( params [ 'midterm_start' ] , params [ 'midterm_end' ] ) final = self . check_dates ( params [ 'final_start' ] , params [ 'final_end' ] ) if mid == 2 : error_msg = "Please fill out both start and end dates for the Midterm dates" return error_msg if final == 2 : error_msg = "Please fill out both start and end dates for the Final dates" return error_msg elif mid == 1 or final == 1 : error_msg = "Please choose an end date that starts after the start date" return error_msg return error_msg
This method handles error message for inserting dates
Input: parameter of dates (start/end dates for midterm/final)
Output: error message
This method handles error message for inserting dates Input : parameter of dates ( start / end dates for midterm / final ) Output : error message
"""
        This method handles error message for inserting dates
        Input: parameter of dates (start/end dates for midterm/final)
        Output: error message
        """
self
params