src/jukedj/models.py
def add_default_deps(project):
    """Add or create the default departments for the given project

    :param project: the project that needs default departments
    :type project: :class:`muke.models.Project`
    :returns: None
    :rtype: None
    :raises: None
    """
    # create deps for project
    for name, short, order, af in DEFAULT_DEPARTMENTS:
        dep, created = Department.objects.get_or_create(name=name, short=short, ordervalue=order, assetflag=af)
        dep.projects.add(project)
        dep.full_clean()
        dep.save()
def add_default_deps(project):
    """Add or create the default departments for the given project

    :param project: the project that needs default departments
    :type project: :class:`muke.models.Project`
    :returns: None
    :rtype: None
    :raises: None
    """
    # create deps for project
    for name, short, order, af in DEFAULT_DEPARTMENTS:
        dep, created = Department.objects.get_or_create(name=name, short=short, ordervalue=order, assetflag=af)
        dep.projects.add(project)
        dep.full_clean()
        dep.save()
Add or create the default departments for the given project

    :param project: the project that needs default departments
    :type project: :class:`muke.models.Project`
    :returns: None
    :rtype: None
    :raises: None