Skip to content

Commit

Permalink
Merge pull request #81 from gisce/fix_cupsdat_isp15_phase2
Browse files Browse the repository at this point in the history
No corregir el tipo de envío de medida en el fichero CUPSDAT
  • Loading branch information
davidmunoznovoa authored Dec 4, 2024
2 parents 97c7436 + 037e13f commit 453d6a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 0 additions & 7 deletions mesures/cupsdat.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ def reader(self, file_path):
if row['fecha_hora_final_vigencia'] == ''
else datetime.strptime(row['fecha_hora_final_vigencia'], '%Y-%m-%d %H').strftime(DATE_MASK), axis=1)

# Patch indicador_tipo_medida if needed
if 'indicador_envio_medida' in self.columns:
df['indicador_envio_medida'] = df.apply(
lambda row: 'Q'
if row['tipo'] in ('1', '2') or not row.get('indicador_envio_medida', False)
else row['indicador_envio_medida'], axis=1)

return df[self.columns]

def writer(self):
Expand Down
1 change: 1 addition & 0 deletions spec/generation_files_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ def get_sample_cupsdat_data():
def get_sample_cupsdat_data_isp_2024():
res = SampleData().get_sample_cupsdat_data()
res[0].update({'indicador_envio_medida': 'Q'})
res[1].update({'indicador_envio_medida': 'Q'})
return res

@staticmethod
Expand Down

0 comments on commit 453d6a6

Please sign in to comment.