fix edit on attendances producing duplicates