Vinícius Cantuária
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
1 deletions
-
sapl/api/views.py
-
sapl/materia/models.py
|
|
@ -457,6 +457,8 @@ class _ProposicaoViewSet(): |
|
|
|
|
|
|
|
@customize(MateriaLegislativa) |
|
|
|
class _MateriaLegislativaViewSet: |
|
|
|
class Meta: |
|
|
|
ordering = ['-ano', 'tipo', 'numero'] |
|
|
|
|
|
|
|
@action(detail=True, methods=['GET']) |
|
|
|
def ultima_tramitacao(self, request, *args, **kwargs): |
|
|
|
|
|
@ -312,7 +312,7 @@ class MateriaLegislativa(models.Model): |
|
|
|
verbose_name = _('Matéria Legislativa') |
|
|
|
verbose_name_plural = _('Matérias Legislativas') |
|
|
|
unique_together = (("tipo", "numero", "ano"),) |
|
|
|
ordering = ['-id'] |
|
|
|
ordering = ['-ano', 'tipo', 'numero'] |
|
|
|
permissions = (("can_access_impressos", "Can access impressos"),) |
|
|
|
|
|
|
|
def __str__(self): |
|
|
|