Skip to content

Commit 462f4f8

Browse files
committed
fix
1 parent bf91c6d commit 462f4f8

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

app/api/event_locations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get(self, *args, **kwargs):
3030
locations = []
3131
for location, _ in popular_locations:
3232
if location is not None:
33-
new_location = EventLocation(location)
33+
new_location = EventLocation(name=location)
3434
new_location.id = len(locations)
3535
locations.append(new_location)
3636
schema = EventLocationSchema()

app/api/events.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,14 +378,13 @@ def after_create_object(self, event, data, view_kwargs):
378378
"""
379379
user = User.query.filter_by(id=view_kwargs['user_id']).first()
380380
role = Role.query.filter_by(name=OWNER).first()
381-
uer = UsersEventsRoles(user, event, role)
381+
uer = UsersEventsRoles(user=user, event=event, role=role)
382382
save_to_db(uer, 'Event Saved')
383383
role_invite = RoleInvite(
384-
user.email,
385-
role.title_name,
386-
event.id,
387-
role.id,
388-
datetime.now(pytz.utc),
384+
email=user.email,
385+
role_name=role.title_name,
386+
event=event,
387+
role=role,
389388
status='accepted',
390389
)
391390
save_to_db(role_invite, 'Owner Role Invite Added')

app/api/role_invites.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def accept_invite():
223223
delete_previous_uer(past_owner)
224224
role_invite.status = "accepted"
225225
save_to_db(role_invite, 'Role Invite Accepted')
226-
uer = UsersEventsRoles(user, event, role)
226+
uer = UsersEventsRoles(user=user, event=event, role=role)
227227
save_to_db(uer, 'User Event Role Created')
228228
if not user.is_verified:
229229
user.is_verified = True

0 commit comments

Comments
 (0)