Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Nov 24, 2024
1 parent 7457c8b commit 7739afd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions playground2.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def company(self):
user = User.find(667)

# Access the related company instance as a property
# related_company = user.company
# print("property name", related_company.company_name) # Output: Acme Corp
related_company = user.company
print("property name", related_company.company_name) # Output: Acme Corp
# print("property 2", related_company.company_name, related_company.company_name=="Acme Corp") # Output: Acme Corp

# # Call the relationship instance to get the related company
Expand All @@ -46,8 +46,8 @@ def company(self):
company = Company.find(373849)

print(company.cards)
for card in company.cards:
print(card)
# for card in company.cards:
# print(card)
# print(company.cards().where("is_default", 1).get())
# print("callable", isinstance(user.company(), HasOne)) # Output: True

0 comments on commit 7739afd

Please sign in to comment.