def _check_balance_reminder(self, card, last_state=None):
        """ Check card stored value """
        if card.stored_value is not None:
            try:
                current_value = float(card.stored_value)

                # Pedantic - make sure the last value isn't identical
                if last_state is not None and last_state.stored_value is not None:
                    last_value = float(last_state.stored_value)
                    if current_value == last_value:
                        app.logger.info((current_value, card.last_four) % 'No change in stored value %s since last reminder: %s')
                        return False

                return current_value > 0 and current_value <= float(self.threshold)
            except:
                app.logger.exception('Exception checking balance')
                pass

        return False
dataset/ETHPy150Open shaunduncan/breezeminder/breezeminder/models/reminder.py/Reminder._check_balance_reminder/swapped operands of `%`