Esempio n. 1
0
def update_roles_pickles(sender, **kwargs):
    for role in CategoryRole.objects.iterator():
        if role.pickled_permissions:
            role.pickled_permissions = serializer.regenerate_checksum(
                role.pickled_permissions)
            role.save(update_fields=['pickled_permissions'])
Esempio n. 2
0
def update_settings_pickles(sender, **kwargs):
    for setting in Setting.objects.iterator():
        if setting.pickled_field_extra:
            setting.pickled_field_extra = serializer.regenerate_checksum(
                setting.pickled_field_extra)
            setting.save(update_fields=['pickled_field_extra'])
Esempio n. 3
0
def update_roles_pickles(sender, **kwargs):
    for role in Role.objects.iterator():
        if role.pickled_permissions:
            role.pickled_permissions = serializer.regenerate_checksum(
                role.pickled_permissions)
            role.save(update_fields=['pickled_permissions'])
Esempio n. 4
0
def update_settings_pickles(sender, **kwargs):
    for setting in Setting.objects.iterator():
        if setting.pickled_field_extra:
            setting.pickled_field_extra = serializer.regenerate_checksum(
                setting.pickled_field_extra)
            setting.save(update_fields=['pickled_field_extra'])