From 61bf53f2332eae7347ecef0473ca9846ab5565a6 Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Thu, 17 Oct 2024 09:52:06 -0500 Subject: [PATCH 1/6] Rescue RecordNotUnique Fixes #1319 --- app/models/exchange_rate/provided.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/exchange_rate/provided.rb b/app/models/exchange_rate/provided.rb index 1927e372..d1e2aea2 100644 --- a/app/models/exchange_rate/provided.rb +++ b/app/models/exchange_rate/provided.rb @@ -52,7 +52,9 @@ module ExchangeRate::Provided rate: response.rate, date: date - rate.save! if cache + if cache + rate.save! rescue ActiveRecord::RecordNotUnique + end rate else nil -- 2.53.0 From 4118cc8a3193fc4194d346f32e19429faa7815fb Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Thu, 17 Oct 2024 10:16:34 -0500 Subject: [PATCH 2/6] Fix for scrollbars on alerts Fixes #1320 --- app/views/issues/_issue.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/issues/_issue.html.erb b/app/views/issues/_issue.html.erb index cabb360c..76ee7c62 100644 --- a/app/views/issues/_issue.html.erb +++ b/app/views/issues/_issue.html.erb @@ -4,9 +4,9 @@ <% text_class = issue.critical? || issue.error? ? "text-error" : "text-warning" %> <%= tag.div class: "flex gap-6 items-center rounded-xl px-4 py-3 #{priority_class}" do %> -
+
<%= lucide_icon("alert-octagon", class: "w-5 h-5 shrink-0") %> -

<%= issue.title %>

+

<%= issue.title %>

-- 2.53.0 From 629565f7d8a3e81352d9343495f57e7955b3d175 Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Thu, 17 Oct 2024 10:20:42 -0500 Subject: [PATCH 3/6] Updated bug report template --- .github/ISSUE_TEMPLATE/bug_report.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 760e2c01..28987582 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -20,6 +20,9 @@ Steps to reproduce the behavior: **Expected behavior** A clear and concise description of what you expected to happen. +**What version of Maybe are you using?** +This could be "Hosted" (i.e. app.maybe.co) or "Self-hosted". If "Self-hosted", please include the version you're currently on. + **Screenshots / Recordings** If applicable, add screenshots or short video recordings to help show the bug in more detail. -- 2.53.0 From b98f35af0eda0c14ad543e4ebd33420aa972627d Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Thu, 17 Oct 2024 10:39:56 -0500 Subject: [PATCH 4/6] Another tweak to the bug template --- .github/ISSUE_TEMPLATE/bug_report.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 28987582..9a250838 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,6 +23,9 @@ A clear and concise description of what you expected to happen. **What version of Maybe are you using?** This could be "Hosted" (i.e. app.maybe.co) or "Self-hosted". If "Self-hosted", please include the version you're currently on. +**What operating system and browser are you using?** +The more info the better. + **Screenshots / Recordings** If applicable, add screenshots or short video recordings to help show the bug in more detail. -- 2.53.0 From ed93670cb80ccac71b6c31c9c0b4fd4666b867cb Mon Sep 17 00:00:00 2001 From: Ender Ahmet Yurt Date: Thu, 17 Oct 2024 18:47:48 +0300 Subject: [PATCH 5/6] Redirect upload step --- app/controllers/imports_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index ef374f6c..47b05988 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -24,7 +24,7 @@ class ImportsController < ApplicationController end def show - redirect_to import_confirm_path(@import), alert: "Please finalize your mappings before proceeding." unless @import.publishable? + redirect_to import_upload_path(@import), alert: "Please finalize your mappings before proceeding." unless @import.publishable? end def destroy -- 2.53.0 From 781562e5fc14abf194586dba98c6bb67c108b5e1 Mon Sep 17 00:00:00 2001 From: Ender Ahmet Yurt Date: Fri, 18 Oct 2024 08:31:00 +0300 Subject: [PATCH 6/6] Change redirect page regarding state of the import --- app/controllers/imports_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index 47b05988..8d311215 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -24,7 +24,11 @@ class ImportsController < ApplicationController end def show - redirect_to import_upload_path(@import), alert: "Please finalize your mappings before proceeding." unless @import.publishable? + if !@import.uploaded? + redirect_to import_upload_path(@import), alert: "Please finalize your file upload." + elsif !@import.publishable? + redirect_to import_confirm_path(@import), alert: "Please finalize your mappings before proceeding." + end end def destroy -- 2.53.0