Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhongxuanWang committed Dec 3, 2023
1 parent c5661cd commit 190cf79
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class Config:
SQLALCHEMY_ECHO = True
# APPLICATION_ROOT = '/api'

# FIREBASE_
# FIREBASE_
3 changes: 0 additions & 3 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ def create_app(config=Config()):
def load_user(user):
user_info = str(user).split('_')
user_type, user_id = user_info[0], user_info[1]
print(' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ')
print(user_info)
print(' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ')
if user_type == 'club':
return Club.query.get({'id': user_id})
elif user_type == 'admin':
Expand Down
5 changes: 0 additions & 5 deletions src/models/fundraiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ def serialize(self, simplified=False, ios_style=True):
'endTime': str(self.end_datetime.strftime(DATETIME_FORMAT)),
'items': [item.serialize() for item in self.items]
}
let
items: [FundraiserItem]
let
transactions: [Transaction]


extra = {}
if not simplified:
Expand Down
3 changes: 2 additions & 1 deletion src/models/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from src import db
from src.utils import DATETIME_FORMAT
from src.models.fundraiser_item import fundraiser_item_transaction_association_table
from src.models import Fundraiser


class Transaction(db.Model):
Expand Down Expand Up @@ -33,7 +34,7 @@ def serialize(self, simplified=False, ios_style=True):
return {
'id': self.id,
'referenceString': self.reference_string,
'fundraiserId': self.fundraiser,
'fundraiser': Fundraiser.query.get({'id': self.fundraiser}),
'timestamp': str(self.added_timestamp.strftime(DATETIME_FORMAT)),
'items': [item.serialize(ios_style=True) for item in self.items],
'buyerId': self.payer,
Expand Down

0 comments on commit 190cf79

Please sign in to comment.