예제 #1
0
파일: install_script.py 프로젝트: skner/TS
def add_prune_rule(_rule):
    try:
        obj = models.dm_prune_field.objects.get(rule=_rule)
    except:
        obj = models.dm_prune_field()
        obj.rule = _rule
        obj.save()
    return obj.pk
예제 #2
0
def add_prune_rule(_rule):
    try:
        obj = models.dm_prune_field.objects.get(rule=_rule)
    except:
        obj = models.dm_prune_field()
        obj.rule = _rule
        obj.save()
    return obj.pk