Skip to content

Search: refactor api view #7633

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

Merged
merged 1 commit into from
Nov 19, 2020
Merged

Search: refactor api view #7633

merged 1 commit into from
Nov 19, 2020

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Nov 2, 2020

Mainly this was done to allow us support searching on
different versions of subprojects.
Currently, we assume we search the same version for all subprojects.

  • _get_all_projects_data and _get_all_projects
    were merged into just one method.
    And instead of returning a list of projects we return a dictionary of project slugs mapped to a VersionData object.
  • There is some duplication in .com.
    _has_permission and _get_subproject_versions_queryset
    are overridden in .com.
  • ProjectData was renamed to VersionData since it has more attributes
    related to a version than a project.

@stsewd stsewd force-pushed the refactor-search-view branch 3 times, most recently from 2acf4d8 to f3590d6 Compare November 2, 2020 22:38
@stsewd stsewd force-pushed the refactor-search-view branch from f3590d6 to 9cacb2c Compare November 3, 2020 14:26
Mainly this was done to allow us support searching on
different versions of subprojects.
Currently, we assume we search the same version for all subprojects.

- _get_all_projects_data and _get_all_projects
  were merged into just one method.
  And instead of returning a list of projects we return a dictionary of project slugs mapped to a VersionData object.
- There is some duplication in .com.
  `_has_permission` and `_get_subproject_versions_queryset`
  are overridden in .com.
- ProjectData was renamed to VersionData since it has more attributes
  related to a version than a project.
@stsewd stsewd force-pushed the refactor-search-view branch from 9cacb2c to e5c0337 Compare November 3, 2020 17:10
@stsewd stsewd added PR: work in progress Pull request is not ready for full review and removed PR: work in progress Pull request is not ready for full review labels Nov 3, 2020
@stsewd stsewd requested a review from a team November 3, 2020 17:41
@stsewd stsewd merged commit aa92a07 into master Nov 19, 2020
@stsewd stsewd deleted the refactor-search-view branch November 19, 2020 18:47
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