-
Notifications
You must be signed in to change notification settings - Fork 71
fix: Fix admin pages for old games without classes too #1555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faucomte97)
aimmo/admin.py, line 22 at r1 (raw file):
def school(self, obj): if obj.game_class:
Should this be if obj and obj.game_class
to be safer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dionizh)
aimmo/admin.py, line 22 at r1 (raw file):
Previously, dionizh (Dioni Zhong) wrote…
Should this be
if obj and obj.game_class
to be safer?
I think checking if obj
isn't needed as obj
refers to the object that is listed in the admin page so obj
shouldn't ever be None.
I can still add the check though if you want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faucomte97)
aimmo/admin.py, line 22 at r1 (raw file):
Previously, faucomte97 (Florian Aucomte) wrote…
I think checking
if obj
isn't needed asobj
refers to the object that is listed in the admin page soobj
shouldn't ever be None.
I can still add the check though if you want?
Yea looking in context the others are not doing it too. All good 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @faucomte97)
Codecov Report
@@ Coverage Diff @@
## development #1555 +/- ##
===============================================
- Coverage 67.19% 67.15% -0.05%
===============================================
Files 160 160
Lines 3268 3270 +2
Branches 231 231
===============================================
Hits 2196 2196
- Misses 1044 1046 +2
Partials 28 28
|
…gy#1555) * fix: Cater for old games without classes * Merge branch 'development' into fix_admin_pages_pt2
* replace os type with enum * move banner to single print statement * update setup to use factory * refactor cmd to allow comment and raise correctly * update setup methods to use task lists * set cmd default comment to caller func name * fix: update setup script to match manual steps * Merge remote-tracking branch 'upstream/development' into akirchberger/fix_aimmo_setup * fix: set setup output to utf-8 * fix: update setup steps for linux * add missing doc param * Merge branch 'development' into akirchberger/fix_aimmo_setup * fix: improve game load time (#1547) * fix: delete only running games in game manager * get only running games in game_manager * delete unkown games in game manager * fix game manager tests * test list running games * Merge branch 'development' into razvan-pro/issue1496 * remove remove_stopped_games * 0.69.13b486 Automatically generated by python-semantic-release * fix: Use Freshdesk widget in load screen (#1546) * fix: Use Freshdesk widget for contact us link instead * Update snapshot test * Use Freshdesk widget template * Update snapshot * Use styles instead of href * Update snapshot * Fix linting errors * Fix spacing * Handle widget opening in React * Declare widget * Update snapshot * Add missing snapshot test * Merge branch 'development' into load_text_link * Refactor loading text * Add unit test * Simplify onClick * 0.69.14b492 Automatically generated by python-semantic-release * build(deps): bump ws from 5.2.2 to 5.2.3 in /game_frontend (#1549) * build(deps): bump ws from 5.2.2 to 5.2.3 in /game_frontend Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@5.2.2...5.2.3) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Merge branch 'development' into dependabot/npm_and_yarn/game_frontend/ws-5.2.3 * 0.69.14b496 Automatically generated by python-semantic-release * 0.69.14 Automatically generated by python-semantic-release * fix: Fix empty name bug in Game (#1550) * fix: Fix empty name bug in Game model * Merge branch 'development' into fix_admin_pages * Merge branch 'development' into fix_admin_pages * 0.69.15b504 Automatically generated by python-semantic-release * ci: update cicd test step, remove unused files (#1556) * ci: update cicd test step, remove unused files * fix: possibly don't need this * ci: install codecov dependencies * ci: fix pytest run, revert installs * 0.69.15b511 Automatically generated by python-semantic-release * fix: Fix admin pages for old games without classes too (#1555) * fix: Cater for old games without classes * Merge branch 'development' into fix_admin_pages_pt2 * 0.69.16b514 Automatically generated by python-semantic-release * fix: set setup output to utf-8 * fix: update setup steps for linux * add missing doc param * add missing doc param * fix: cmd stdout empty result * fix: set minikube and kubectl to latest versions * refactor: split result to read better * fix: add banner notice for mac and linux support only. * fix: add sqlite3 update task * fix: rename pipenv run task to build pipenv venv * fix: remove unnecessary tasks from prev code * Merge remote-tracking branch 'upstream/development' into akirchberger/fix_aimmo_setup * Merge remote-tracking branch 'upstream/development' into akirchberger/fix_aimmo_setup * Merge branch 'akirchberger/fix_aimmo_setup' of github.com:adamkirchberger/aimmo into akirchberger/fix_aimmo_setup * fix: remove snap install * fix: decode stdout bytes * Merge branch 'development' into akirchberger/fix_aimmo_setup
This change is