def update_dashboard(self, obj):
    try:
        portal_pos = UserSettings.objects.get(user=obj.user, key=('dashboard:%s:pos' % obj.page_id))
    except UserSettings.DoesNotExist:
        return
    pos = [[w for w in col.split(',') if (w != str(obj.id))] for col in portal_pos.value.split('|')]
    portal_pos.value = '|'.join([','.join(col) for col in pos])
    portal_pos.save()
def update_dashboard(self, obj):
    try:
        portal_pos = UserSettings.objects.get(user=obj.user, key=('dashboard:%s:pos' % obj.page_id))
    except UserSettings.DoesNotExist:
        return
    pos = [[w for w in col.split(',') if (w != str(obj.id))] for col in portal_pos.value.split('|')]
    portal_pos.value = '|'.join([','.join(col) for col in pos])
    portal_pos.save()