Beispiel #1
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
Beispiel #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