Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rage.portale into crud
  • Loading branch information
francesco-filicetti committed Jul 27, 2022
2 parents 269eb49 + 4a910e3 commit 39088b8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions ricerca_app/migrations/0069_auto_20220726_1523.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.13 on 2022-07-26 15:23

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('ricerca_app', '0068_alter_personaleattivotuttiruoli_cd_uo_aff_org'),
]

operations = [
migrations.AddField(
model_name='didatticacopertura',
name='stato_coper_cod',
field=models.CharField(blank=True, db_column='STATO_COPER_COD', max_length=10, null=True),
),
migrations.AddField(
model_name='didatticacopertura',
name='stato_coper_des',
field=models.CharField(blank=True, db_column='STATO_COPER_DES', max_length=100, null=True),
),
]
2 changes: 2 additions & 0 deletions ricerca_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,8 @@ class DidatticaCopertura(InsModAbstract):
db_column='COPER_PESO', blank=True, null=True)
# Field name made lowercase.
ore = models.PositiveIntegerField(db_column='ORE', blank=True, null=True)
stato_coper_cod = models.CharField(db_column='STATO_COPER_COD', max_length=10, blank=True,null=True) # Field name made lowercase.
stato_coper_des = models.CharField(db_column='STATO_COPER_DES', max_length=100, blank=True,null=True) # Field name made lowercase.

class Meta:
managed = True
Expand Down
2 changes: 1 addition & 1 deletion ricerca_app/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ def getAttivitaFormativaWithSubModules(af_id, language):
)
query = list(query)

query[0]['Hours'] = DidatticaCoperturaDettaglioOre.objects.filter(coper_id__af_id=af_id).values(
query[0]['Hours'] = DidatticaCoperturaDettaglioOre.objects.filter(~Q(coper_id__stato_coper_cod='R'),coper_id__af_id=af_id).values(
'tipo_att_did_cod',
'ore',
'coper_id__personale_id__matricola',
Expand Down

0 comments on commit 39088b8

Please # to comment.