PowerFeed.phase to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-11-25 21:14:04 -05:00
parent bb8b012397
commit 2dc07ca30d
6 changed files with 50 additions and 18 deletions

View File

@@ -900,11 +900,27 @@ class PowerFeedSupplyChoices(ChoiceSet):
SUPPLY_DC = 'dc'
CHOICES = (
(SUPPLY_AC, 'Primary'),
(SUPPLY_DC, 'Redundant'),
(SUPPLY_AC, 'AC'),
(SUPPLY_DC, 'DC'),
)
LEGACY_MAP = {
SUPPLY_AC: 1,
SUPPLY_DC: 2,
}
class PowerFeedPhaseChoices(ChoiceSet):
PHASE_SINGLE = 'single-phase'
PHASE_3PHASE = 'three-phase'
CHOICES = (
(PHASE_SINGLE, 'Single phase'),
(PHASE_3PHASE, 'Three-phase'),
)
LEGACY_MAP = {
PHASE_SINGLE: 1,
PHASE_3PHASE: 3,
}