the user id may be negative, so that osmosis can create changesets for users that are anonymous, which it uses a negative id for, as a special id.

This commit is contained in:
Shaun McDonald 2008-12-08 15:32:29 +00:00
parent 2e41c35479
commit 59c69a642f

View file

@ -17,7 +17,7 @@ class Changeset < ActiveRecord::Base
validates_uniqueness_of :id validates_uniqueness_of :id
validates_numericality_of :id, :on => :update, :integer_only => true validates_numericality_of :id, :on => :update, :integer_only => true
validates_numericality_of :min_lat, :max_lat, :min_lon, :max_lat, :allow_nil => true, :integer_only => true validates_numericality_of :min_lat, :max_lat, :min_lon, :max_lat, :allow_nil => true, :integer_only => true
validates_numericality_of :user_id, :integer_only => true, :greater_than_or_equal_to => 1 validates_numericality_of :user_id, :integer_only => true
validates_numericality_of :num_changes, :integer_only => true, :greater_than_or_equal_to => 0 validates_numericality_of :num_changes, :integer_only => true, :greater_than_or_equal_to => 0
validates_associated :user validates_associated :user