|
@ -54,7 +54,7 @@ class ComposicaoCrud(MasterDetailCrud): |
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
def get_context_data(self, **kwargs): |
|
|
context = super().get_context_data(**kwargs) |
|
|
context = super().get_context_data(**kwargs) |
|
|
context['composicao_pk'] = context['composicao_list'].first( |
|
|
context['composicao_pk'] = context['composicao_list'].last( |
|
|
).pk if self.take_composicao_pk( |
|
|
).pk if self.take_composicao_pk( |
|
|
) == 0 else self.take_composicao_pk() |
|
|
) == 0 else self.take_composicao_pk() |
|
|
context['participacao_set'] = Participacao.objects.filter( |
|
|
context['participacao_set'] = Participacao.objects.filter( |
|
|