Skip to content

Commit

Permalink
fix: ajuste erro de forms e bump versions dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandroJatai committed Oct 7, 2024
1 parent df49719 commit 5d075a9
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 24 deletions.
8 changes: 4 additions & 4 deletions cmj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
re_path(r'^sapl/', include(sapl.base.urls)),"""

from django.conf import settings
from django.urls.conf import re_path, include
from django.conf.urls.static import static
from django.contrib import admin
from django.urls.conf import re_path, include
from django.views.generic.base import TemplateView

import cmj.agenda.urls
Expand All @@ -37,8 +37,8 @@
import cmj.core.urls
from cmj.core.views_short import ShortRedirectView
import cmj.diarios.urls
import cmj.loa.urls
import cmj.globalrules.urls
import cmj.loa.urls
import cmj.ouvidoria.urls
import cmj.search.urls
import cmj.sigad.urls
Expand All @@ -61,7 +61,7 @@

urlpatterns_all = [
re_path(r'^j(?P<short>[0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*)$',
ShortRedirectView.as_view(), name='short_view'),
ShortRedirectView.as_view(), name='short_view'),

re_path(r'^admin/', admin.site.urls),

Expand Down Expand Up @@ -102,7 +102,7 @@

if settings.DEBUG_TOOLBAR_ACTIVE:
import debug_toolbar
urlpatterns_all.append(url('__debug__/', include(debug_toolbar.urls)))
urlpatterns_all.append(re_path('__debug__/', include(debug_toolbar.urls)))

if settings.DEBUG:
urlpatterns_all += static(settings.STATIC_URL,
Expand Down
11 changes: 6 additions & 5 deletions requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
-r test-requirements.txt
autopep8==2.2.0
beautifulsoup4==4.12.3
autopep8==2.3.1
django-debug-toolbar==4.4.6
pygraphviz==1.10
pipdeptree

pygraphviz==1.14
pipdeptree==2.23.4

jupyterlab==4.2.5
plotly==5.24.1
pandas==2.2.3

opencv-contrib-python-headless

Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ django-extensions==3.2.3
djangorestframework==3.15.2

social-auth-app-django==5.4.2
python-telegram-bot==21.6

django-crispy-forms==2.3
crispy-bootstrap4==2024.1
Expand Down Expand Up @@ -40,7 +41,6 @@ django-filter==2.4.0
django-model-utils==4.0.0
drf-spectacular==0.24.2
django-webpack4-loader
python-telegram-bot==20.1



Expand Down
22 changes: 11 additions & 11 deletions requirements/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-r requirements.txt
coverage==4.0.3
django-webtest
flake8
flake8-docstrings
isort==4.2.5
model_mommy==1.2.6
pep8==1.7.0
pytest==2.7.2
pytest-cov==2.2.1
pytest-django==2.9.1
webtest==2.0.21
coverage==7.6.1
django-webtest==1.9.12
flake8==7.1.1
flake8-docstrings==1.7.0
isort==5.13.2
model_mommy==2.0.0
pep8==1.7.1
pytest==8.3.3
pytest-cov==5.0.0
pytest-django==4.9.0
webtest==3.0.1
4 changes: 2 additions & 2 deletions sapl/comissoes/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Meta:
def __init__(self, user=None, **kwargs):
super(ParticipacaoCreateForm, self).__init__(**kwargs)

if self.instance:
if self.instance and self.instance.pk:
comissao = kwargs['initial']
comissao_pk = int(comissao['parent_pk'])
composicao = Composicao.objects.get(id=comissao_pk)
Expand Down Expand Up @@ -434,7 +434,7 @@ class Meta:
def __init__(self, user=None, **kwargs):
super(DocumentoAcessorioCreateForm, self).__init__(**kwargs)

if self.instance:
if self.instance and self.instance.pk:
reuniao = Reuniao.objects.get(id=self.initial['parent_pk'])
comissao = reuniao.comissao
comissao_pk = comissao.id
Expand Down
2 changes: 1 addition & 1 deletion sapl/protocoloadm/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ def __init__(self, *args, **kwargs):
self.fields['numero_materia'].initial = inst.materia.numero
self.fields['ano_materia'].initial = inst.materia.ano

if inst:
if inst and inst.pk:
anexador = inst.documento_anexado_set.first()
if anexador:
anexador = anexador.documento_principal
Expand Down

0 comments on commit 5d075a9

Please sign in to comment.