Skip to content

Commit

Permalink
String not decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndifreke000 committed Jan 25, 2025
1 parent 058eb45 commit 71ae959
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web_app/db/seed_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def create_transaction(session: SessionLocal, positions: list[Position]) -> None
logger.info(f"Created {len(transactions)} transactions.")




def create_extra_deposits(session: SessionLocal, positions: list[Position]) -> None:
"""
Create and save extra deposit records that are associated with positions.
Expand All @@ -203,10 +205,9 @@ def create_extra_deposits(session: SessionLocal, positions: list[Position]) -> N
token_symbol=fake.random_element(
elements=[token.name for token in TokenParams.tokens()]
),
amount=Decimal(
amount=String(
fake.pydecimal(left_digits=5, right_digits=2, positive=True)
),
is_confirmed=fake.boolean()
)
)
extra_deposits.append(extra_deposit)

Expand All @@ -218,6 +219,7 @@ def create_extra_deposits(session: SessionLocal, positions: list[Position]) -> N
logger.info("No extra deposits created.")



if __name__ == "__main__":
# Start a new session for seeding data
with SessionLocal() as session:
Expand Down

0 comments on commit 71ae959

Please sign in to comment.