Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Summary
Fixes two issues and adds a database migration to resolve schema inconsistency:

Zatladder Controller: When no Amber users exist, fallback to sofia_account users instead of crashing:

users = User.in_amber.any? ? User.in_amber : User.sofia_account
@users_spendings = users.calculate_spendings(from:, to:)
OTP Authentication: Accept 1-period drift to handle clock skew between client and server:

sofia_account.authenticate_otp(params[:verification_code], drift: 1)
Database Migration: Adds order_total column back to orders table if missing, resolving schema.rb inconsistency.

Other information
Migration is idempotent using column_exists? check to safely run on environments where the column may already exist.

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Add the sub provider field to UI Add sub_provider field to User model and UI Dec 12, 2025
Copilot AI requested a review from lodewiges December 12, 2025 16:41
@lodewiges lodewiges closed this Dec 12, 2025
@lodewiges lodewiges deleted the copilot/sub-pr-1173 branch January 14, 2026 09:26
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