Exemplo n.º 1
0
def merge_selected_people(modeladmin, request, queryset):
    if queryset.count() < 2:
        return

    from core.merge_people import find_best_candidate, merge_people

    person_to_spare, people_to_merge = find_best_candidate(queryset)
    merge_people(people_to_merge, into=person_to_spare)
Exemplo n.º 2
0
def merge_selected_people(modeladmin, request, queryset):
    if queryset.count() < 2:
        return

    from core.merge_people import find_best_candidate, merge_people

    person_to_spare, people_to_merge = find_best_candidate(queryset)
    merge_people(people_to_merge, into=person_to_spare)