Esempio n. 1
0
def collection_stage_from_value(x):
    values = values_list(x, "collection_stage_name")
    if values:
        choices = list(choices_from_values(values, CollectionStage.STAGES))
        if len(choices) > 0:
            return choices[0]
    return None
Esempio n. 2
0
def collection_stage_from_value(x):
    values = values_list(x, "collection_stage_name")
    if values:
        choices = list(choices_from_values(values, CollectionStage.STAGES))
        if len(choices) > 0:
            return choices[0]
    return None
Esempio n. 3
0
def project_status_from_statuses(x):
    values = values_list(x, "project_status_name")
    if values:
        choices = list(choices_from_values(values, ProjectStatus.STATUSES))
        if len(choices) > 0:
            return choices[0]
    return None
Esempio n. 4
0
def project_status_from_statuses(x):
    values = values_list(x, "project_status_name")
    if values:
        choices = list(choices_from_values(values, ProjectStatus.STATUSES))
        if len(choices) > 0:
            return choices[0]
    return None