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

fix: Fix admin pages for old games without classes too #1555

Merged
merged 2 commits into from
Jul 8, 2021

Conversation

faucomte97
Copy link
Contributor

@faucomte97 faucomte97 commented Jul 8, 2021

This change is Reviewable

@faucomte97 faucomte97 self-assigned this Jul 8, 2021
Copy link
Contributor

@dionizh dionizh left a 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?

Copy link
Contributor Author

@faucomte97 faucomte97 left a 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?

Copy link
Contributor

@dionizh dionizh left a 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 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?

Yea looking in context the others are not doing it too. All good 🙃

Copy link
Contributor

@dionizh dionizh left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @faucomte97)

@codecov
Copy link

codecov bot commented Jul 8, 2021

Codecov Report

Merging #1555 (d32578c) into development (7ebee03) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               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              
Impacted Files Coverage Δ
aimmo/admin.py 74.19% <0.00%> (-5.12%) ⬇️

@faucomte97 faucomte97 merged commit ba65227 into development Jul 8, 2021
@faucomte97 faucomte97 deleted the fix_admin_pages_pt2 branch July 8, 2021 17:34
adamkirchberger pushed a commit to adamkirchberger/aimmo that referenced this pull request Sep 12, 2021
…gy#1555)

* fix: Cater for old games without classes

* Merge branch 'development' into fix_admin_pages_pt2
dionizh pushed a commit that referenced this pull request Oct 25, 2021
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants