diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-11-30 10:02:15 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-11-30 10:02:15 +0100 |
commit | 3f150eb2aae74d8b9ba43c32a5ae655a3a7f71bf (patch) | |
tree | 5a081bdcf966a1e5918ca120a52b36b2e469bd6d /validation/validation_service.rb | |
parent | 65ec4bc561e10a895558876b551a3a5a5e05050d (diff) |
fix validation_type for example
Diffstat (limited to 'validation/validation_service.rb')
-rw-r--r-- | validation/validation_service.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/validation/validation_service.rb b/validation/validation_service.rb index 0907edb..d549896 100644 --- a/validation/validation_service.rb +++ b/validation/validation_service.rb @@ -43,6 +43,13 @@ module Validation raise "internal error, validation-id not set "+to_yaml if self.id==nil end + def save! + # make sure that non-temporary validation objects have a valiation_type + # (a temporary validation object is created for crossvaldiation/statistics) + $sinatra.halt 500,"validation_type missing" unless self.validation_type + super + end + # deletes a validation # PENDING: model and referenced datasets are deleted as well, keep it that way? def delete |