(lst)
return
Ensure at least one tag is present in the
Ensure at least one tag is present in the
Ensure at least one tag is present in the
def required_tags(lst):
    """
    Ensure at least one tag is present in the
    """
    if not os.path.isfile(settings.REQUIRED_TAGS):
        return

    # Get the tags file.
    tags = open(settings.REQUIRED_TAGS, 'r').readlines()
    tags = set([x.strip() for x in tags])

    # Create two sets from the source ( input parameter)
    # and target ( file with required tags ) .
    source_set = set(lst)
    target_set = set(tags)

    # If one common element is not found, display the required tasks
    if not common_elem(source_set, target_set):
        url = settings.REQUIRED_TAGS_URL
        msg = mark_safe(f"At least one package from <a href='{url}' target='_blank'>this list</a> is required.")
        raise forms.ValidationError(msg)

    return
def required_tags ( lst ) : if not os . path . isfile ( settings . REQUIRED_TAGS ) : return # Get the tags file. tags = open ( settings . REQUIRED_TAGS , 'r' ) . readlines ( ) tags = set ( [ x . strip ( ) for x in tags ] ) # Create two sets from the source ( input parameter) # and target ( file with required tags ) . source_set = set ( lst ) target_set = set ( tags ) # If one common element is not found, display the required tasks if not common_elem ( source_set , target_set ) : url = settings . REQUIRED_TAGS_URL msg = mark_safe ( f"At least one package from <a href='{url}' target='_blank'>this list</a> is required." ) raise forms . ValidationError ( msg ) return