Skip to content
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

Feature/deseng 444: Engagement Metadata API #2362

Merged
merged 19 commits into from
Jan 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove some print statements
NatSquared committed Jan 24, 2024
commit dde766c035da5231f857c29ede9fe0793c6bd0ec
4 changes: 0 additions & 4 deletions met-api/src/met_api/models/engagement_metadata.py
Original file line number Diff line number Diff line change
@@ -122,8 +122,6 @@ def move_to_position(self, new_position: int) -> None:
MetadataTaxon.tenant_id == tenant_id,
MetadataTaxon.position.between(start, end)
).all()
print(affected_taxa)
print([taxon.position for taxon in affected_taxa])
# Determine the direction of the position update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love to see line-by-line comments for more complicated operations

position_delta = -1 if new_position > current_position else 1
# Update positions for each affected taxon
@@ -134,8 +132,6 @@ def move_to_position(self, new_position: int) -> None:
# Finally, update the position of the current taxon
self.position = new_position
db.session.commit()
print(affected_taxa)
print([taxon.position for taxon in affected_taxa])

@transactional()
def delete(self) -> None: