Skip to content
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

Map: Reset Spawnpoints after migration #234

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

evenly-epic-mule
Copy link
Contributor

Marking not jet updated spawns as mysteries again

@@ -138,10 +138,12 @@ def get_spawnpoint_markers():
spawns = session.query(Spawnpoint)
return [{
'spawn_id': spawn.spawn_id,
'despawn_time': spawn.despawn_time,
'despawn_time': spawn.despawn_time
if spawn.updated and spawn.updated > conf.LAST_MIGRATION else None,
Copy link
Owner

Choose a reason for hiding this comment

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

I'd say truth-testing spawn.updated before the comparison isn't necessary. The default migration time isn't zero and if someone wants to disable migration checks entirely they should set LAST_MIGRATION to 1 or any time before their first scan. So with a valid configuration spawn.updated > conf.LAST_MIGRATION should always fail when spawn.updated fails the truth test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

after removing the spawn.updated and I get TypeError: unorderable types: NoneType() > int()
guess I'll have to readd it

Marking not jet updated spawns as mysteries again
RobTwoThree pushed a commit to RobTwoThree/Monocle that referenced this pull request Dec 25, 2017
Cleaned up duplicate and unused imports.
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