Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodlz committed Apr 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 4a82f5c + 49e8851 commit 94af773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/skyportal/skyportal/handlers/api/archive.py
Original file line number Diff line number Diff line change
@@ -499,7 +499,7 @@ def post(self):

with self.Session() as session:
obj = session.scalars(
Obj.select(self.current_user).where(Obj.id == obj_id)
Obj.select(session.user_or_token).where(Obj.id == obj_id)
).first()
if obj is None:
return self.error(
@@ -508,7 +508,7 @@ def post(self):

group_ids = [g.id for g in self.current_user.accessible_groups]
groups = session.scalars(
Group.select(self.current_user).where(Group.id.in_(group_ids))
Group.select(session.user_or_token).where(Group.id.in_(group_ids))
).all()

if {g.id for g in groups} != set(group_ids):
@@ -1088,7 +1088,7 @@ def post(self):
photometry["stream_ids"] = df_photometry["stream_ids"].tolist()

if len(photometry.get("mag", ())) > 0:
add_external_photometry(photometry, self.current_user)
add_external_photometry(photometry, self.associated_user_object)

finally:
# always attempt deleting the temporary token

0 comments on commit 94af773

Please sign in to comment.