Skip to content

Refactored Project Search and Issue Search

MariaV requested to merge cleanup_results_dictionary into master

Refactored project_search and issue_search methods from forms.py (SearchForm) by passing entire project into results dictionary (versus taking specific fields from project); this allows for search result templates to have full access to project dictionary returned from gitlab. Refactored search template to use project dictionary versus passing specific fields into request dictionary. Moved all messages (e.g. issue_not_found_message, project_not_found_message) from global level of forms.py to inside of project search and issue search functions. Also changed get in project_search to get_object_or_404 to increase security. Removed/shortened several lines of duplicate code in project search and issue search in forms.py

Merge request reports

Loading