Skip to content

Commit

Permalink
Merge pull request #648 from gisce/bugfix/58161_calc_field_ajena_in_B…
Browse files Browse the repository at this point in the history
…4_c8_2021

FIX calculo campo ajena en formulario B4 Circular 8_2021
  • Loading branch information
ecarreras authored May 8, 2024
2 parents 51133b1 + 70d4d7a commit e51c37c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions libcnmc/cir_8_2021/FB4.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,15 @@ def get_inst_name(element_id):
ti = ''

#AJENA
if pos['propietari']:
ajena = 0
else:
ajena = 1
ajena = 1
if pos.get('propietari', False):
# Agafar la propietat de les Posicions a on la Subestació
# també és propietat
if pos.get('subestacio_id', False):
sub_id = pos['subestacio_id'][0]
se_data = self.get_cts_data(sub_id)
if se_data.get('propietari', False):
ajena = 0

#NODE
if pos['node_id']:
Expand Down

0 comments on commit e51c37c

Please sign in to comment.