Skip to content

Add entity core bookmark #82

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

bilalesi
Copy link
Collaborator

@bilalesi bilalesi commented Apr 15, 2025

  1. add entity-id to the db model and pydantic schemas.
  2. the entity-id is optional now, but it should be required when we migrate.
  3. allow deleting by resource id and entity id for the moment.
  4. add a new endpoint for bulk update specific for entitycore, this endpoint is used for single/multiple deletion in the FE migration.

@bilalesi bilalesi self-assigned this Apr 15, 2025
@bilalesi bilalesi force-pushed the add-entity-core-bookmark branch from 0a999c3 to c52b6a5 Compare April 15, 2025 15:53
@@ -215,8 +215,11 @@ class Bookmark(Base):

id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
resource_id = Column(String, nullable=False, index=True)

entity_id: Mapped[uuid.UUID | None] = mapped_column(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this should changed after the migration to not allow Null values

Comment on lines +21 to +23

if category is not None:
query = query.where(Bookmark.category == category)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add the option to filter by category in the getAll endpoint

Comment on lines +107 to +111
@router.post(
"/{virtual_lab_id}/projects/{project_id}/bookmarks/delete",
summary="Delete bookmark by category and resource id",
response_model=LabResponse[None],
)
@verify_vlab_or_project_read
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this endpoint specific for entity core migration,

@bilalesi bilalesi requested a review from pgetta April 17, 2025 13:50
pgetta
pgetta previously approved these changes Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants