-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SmrAlliance: disallow alliance ID of 0
Previously, we would allow creating an `SmrAlliance` instance when the input `$allianceID` was 0. This was problematic because most of the class attributes would be unset, and most methods would be unusable. Now, we will raise an AllianceNotFoundError if the ID is 0, and we remove the `isNone` method. This will ensure that all instances of the class are valid and can be used without restriction. We replace the existing `isNone` calls with checks if the alliance ID is 0.
- Loading branch information
Showing
3 changed files
with
47 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters