Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Loader: Subset groups using client operations #3710

Merged
merged 7 commits into from
Aug 23, 2022

Conversation

iLLiCiTiT
Copy link
Member

Brief description

Use client opeartions to change subset group on subset documents.

Testing notes:

  1. Open any host on project where you have something published
  2. Open loader tool in the host
  3. Select subset/s
  4. Hit Ctrl + G
  5. Change group of subset
  6. Group change should be propagated

@ynbot
Copy link
Contributor

ynbot commented Aug 23, 2022

Task linked: OP-3813 Subset groups using operations

@iLLiCiTiT iLLiCiTiT self-assigned this Aug 23, 2022
@iLLiCiTiT iLLiCiTiT added the type: refactor Structural changes not affecting functionality label Aug 23, 2022
Comment on lines 275 to 282
repre_info = list(
self.sync_server.get_repre_info_for_versions(
project_name,
[version_doc["_id"]],
self.active_site,
self.remote_site
)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't next make more sense here since you always just want the first entry?

Copy link
Member Author

Choose a reason for hiding this comment

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

To be honest I don't like using next for such long expressions especially when it would make it even longer.

repre_info = next(
    self.sync_server.get_repre_info_for_versions(
        project_name,
        [version_doc["_id"]],
        self.active_site,
        self.remote_site
    ),
    None
)

@iLLiCiTiT iLLiCiTiT merged commit 88682dd into develop Aug 23, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/OP-3813_Subset-groups-using-operations branch August 23, 2022 15:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: refactor Structural changes not affecting functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants