"""Feature flags on backend.""" from abacus_common_logic.utils.features import is_feature_enabled from flask import g # this FF has been removed from code, but I'm leaving it for future reference # when a new FF is added to this repo, this can be replaced FEATURE_ABACUS_REMOVE_APPLY_PENDING_ADJUSTMENTS = ( 'abacus_remove_apply_pending_adjustments' ) FEATURE_ABACUS_AUTO_GENERATE_ADJUSTMENTS = ( 'abacus_auto_generate_adjustments_action_states' ) def is_remove_apply_pending_adjustments_enabled(): """Shortcut to check FEATURE_ABACUS_REMOVE_APPLY_PENDING_ADJUSTMENTS is enabled.""" return is_feature_enabled( FEATURE_ABACUS_REMOVE_APPLY_PENDING_ADJUSTMENTS, g.request_context ) def is_abacus_flowthrough_automation_enabled(): """Shortcut to check abacus_auto_generate_adjustments_flowthrough feature is enabled.""" return is_feature_enabled( FEATURE_ABACUS_AUTO_GENERATE_ADJUSTMENTS, g.request_context )