Skip to content

Commit

Permalink
improve inconsistency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloarocha committed Nov 29, 2023
1 parent 53f7597 commit 57fab81
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions services/admin/drug_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,19 @@ def fix_inconsistency(user):
)
schema = user.schema

# normalize medatributos
query_normalize = f"""
update
{schema}.medatributos
set
fkunidademedida = null
where
fkunidademedida = ''
"""

db.session.execute(query_normalize)

# include medatributos
query = f"""
with inconsistentes as (
select
Expand Down

0 comments on commit 57fab81

Please sign in to comment.