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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
set a validation for lag to to avoid saving long value for it and avoid 500 error
Behrokh Satarnejada79116311cb5
diff --git a/app/models/relation.rb b/app/models/relation.rbindex 0e195286d7c..cd56d9d53f2 100644--- a/app/models/relation.rb+++ b/app/models/relation.rb@@ -103,7 +103,7 @@ class Relation < ApplicationRecordscope :follows_with_lag,-> { follows.where("lag > 0") }- validates :lag, numericality: { allow_nil: true }+ validates :lag, numericality: { allow_nil: true, less_than_or_equal_to: 2_147_483_647 }validates :to, presence: true, uniqueness: { scope: :from }