-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PB-22e: stripe database functionality #57
base: PB-22-add-payment-info-stripe
Are you sure you want to change the base?
PB-22e: stripe database functionality #57
Conversation
possible name conflict, backend gets stacktrace. Draft until fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm🚀🚀
update: trekker det midlertidig tilbake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Får en bug i StripeCustomerRepository.get_by_id(customer_id) i get_by_customer_id() i update i stripe_customer_service. Hverken jeg eller gjengen i chatgpt har helt skjønt hva den kommer fra enda.
Eksempelet:
stripe_customer:StripeCustomer = stripe_service.get_by_customer_id(stripe_customer_id)
stripe_customer.is_premium = True
stripe_customer_dict = stripe_customer.__dict__
print(type(stripe_customer_dict))
print(stripe_customer_dict)
stripe_customer_dict.pop("_sa_instance_state", None)
stripe_customer_dict['created_at'] = stripe_customer_dict['created_at'].isoformat()
try:
t = stripe_service.update(data=stripe_customer_dict, customer_id=stripe_customer.customer_id)
except Exception as e:
print(e)
gir:
StripeCustomerRepository' object has no attribute '_sa_instance_state'
Mulig å se i pb-22d-stripe-webhook-functionality for mer logs og mer fullstendig eksempel.
Kan det komme av noe feil med migrations? (var jo noe knot der)
hmm, ja kk. Håper dette ikke er en case av "dette funker på min maskin". Jeg skal sjekke det ut, men får nok ikke tid til det før onsdag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏👏👏 bra jobba!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM sjef 🚀 bare en liten ting jeg undret på👇🏼
|
||
|
||
class StripeCustomerRepository(StripeCustomer, CrudMixin): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hvorfor trenger vi klassen om den ikke gjør noe? Fungerer den som et slags tomt mellomlag?
Adds stripe customer table in a 1:1 relationship with a slack_organization.
Contains fields:
Run the backend docker container and in its terminal run
flask db upgrade
to run the migration