Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove not(reason: nil) as that can no longer be the case

Oliver Günther15febf16d001
diff --git a/lib/api/v3/notifications/notifications_api.rb b/lib/api/v3/notifications/notifications_api.rb
index be865c8f660..cafdd10cd2d 100644
--- a/lib/api/v3/notifications/notifications_api.rb
+++ b/lib/api/v3/notifications/notifications_api.rb
@@ -46,8 +46,6 @@ module API
::Notification
.recipient(current_user)
.includes(NotificationRepresenter.to_eager_load)
- .where
- .not(reason: nil)
end
def bulk_update_status(attributes)
diff --git a/spec/contracts/notifications/create_contract_spec.rb b/spec/contracts/notifications/create_contract_spec.rb
index 9c3e69d99b5..d9eab6d3b04 100644
--- a/spec/contracts/notifications/create_contract_spec.rb
+++ b/spec/contracts/notifications/create_contract_spec.rb
@@ -66,16 +66,8 @@ describe Notifications::CreateContract do
it_behaves_like 'contract is invalid', recipient: :blank
end
- context 'without a reason for IAN with read_ian false' do
+ context 'without a reason' do
let(:notification_reason) { nil }
- let(:notification_read_ian) { false }
-
- it_behaves_like 'contract is invalid', reason: :no_notification_reason
- end
-
- context 'without a reason for IAN with read_ian nil' do
- let(:notification_reason) { nil }
- let(:notification_read_ian) { nil }
it_behaves_like 'contract is invalid', reason: :no_notification_reason
end