When updating a newly created mod: ``` Traceback (most recent call last): File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/KerbalStuff/common.py", line 81, in go ret = f(*args, **kwargs) File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/KerbalStuff/common.py", line 124, in wrapper result = f(*args, **kwargs) File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/KerbalStuff/blueprints/api.py", line 152, in wrapper return func(*args, **kwargs) File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/KerbalStuff/blueprints/api.py", line 738, in update_mod mod.score = get_mod_score(mod) File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/KerbalStuff/search.py", line 39, in get_mod_score num_incompat = versions_behind(mod) File "/var/www/virtual/spacedock.info/htdocs/SpaceDock/KerbalStuff/search.py", line 48, in versions_behind compat = version.Version(mod.default_version.gameversion.friendly_version) AttributeError: 'NoneType' object has no attribute 'friendly_version' ``` So we should also call `db.commit()` before setting `mod.score` in `update_mod()`, same as `create_mod()`.