Fixed update bug in CorpContact admin selects
The problem is that Django RelatedObjectLookups.js is triggering select changes for the initial value and we don't want to change the contact list for this initial change (unless we lose the currently selected value).
This commit is contained in:
parent
f39724f551
commit
579236986e
3 changed files with 6 additions and 4 deletions
|
|
@ -243,7 +243,7 @@ class TrainingsByPeriodView(ListView):
|
|||
|
||||
class CorpContactJSONView(ListView):
|
||||
""" Return all contacts from a given corporation """
|
||||
return_fields = ['id', 'first_name', 'last_name', 'role', 'is_main']
|
||||
return_fields = ['id', 'first_name', 'last_name', 'role', 'is_main', 'corporation_id']
|
||||
|
||||
def get_queryset(self):
|
||||
return CorpContact.objects.filter(corporation__pk=self.kwargs['pk'], archived=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue