Skip to content

Commit

Permalink
fix insert
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafaelrn committed Apr 23, 2024
1 parent cd69461 commit 91a047b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/functions/bd_transaction/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ def insert(data):
#Transfor to json
try:
ARRAY_DATA = json.loads(data)

except Exception as e:
print(f'Error when parse JSON: {e}')

# Se ARRAY_DATA for do tipo 'list',
# Pegar o 1o elemento
if type(data) == list:
ARRAY_DATA = data[0]
else:
ARRAY_DATA = data
else:
return f'Error when parse JSON: {e}'

feedbacks = []

Expand Down

0 comments on commit 91a047b

Please sign in to comment.