Skip to content

Commit

Permalink
Fix: Code Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
mpedreira committed Dec 3, 2024
1 parent 61340d2 commit 573bd15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/api/api_v1/endpoints/entrance.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=E0401
# pylint: disable=E0401,R0914
"""
Saves data of the entrance and exit of the employee
"""
from fastapi import APIRouter
from datetime import datetime
from fastapi import APIRouter
from boto3.dynamodb.conditions import Key
from app.classes.adapters.database_dynamo_aws import DatabaseDynamoAWS
from app.classes.adapters.config_aws import ConfigAWS
Expand Down Expand Up @@ -55,11 +55,11 @@ def set_entrance(person: str):
key = {"day": day, "person": person}
diference = salida - entrada
seconds = int(diference.total_seconds())
UPDATE_EXPRESSION = "SET salida = :salida, working_seconds = :working_seconds"
update_expresion = "SET salida = :salida, working_seconds = :working_seconds"
expression_attribute_values = {
":salida": hour, ":working_seconds": seconds} # Nuevo valor para Edad
result = database_instance.update_item(
key, UPDATE_EXPRESSION, expression_attribute_values)
key, update_expresion, expression_attribute_values)
return result
data = {
'day': day, # Clave primaria obligatoria
Expand Down
2 changes: 1 addition & 1 deletion app/classes/adapters/config_aws.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# pylint: disable=C0301,R0903,E0401
# pylint: disable=C0301,R0903,E0401,R0902
# -*- coding: utf-8 -*-
"""Module for static configuration of Claroty"""

Expand Down

0 comments on commit 573bd15

Please sign in to comment.