From 3278e474a32ef4926b1dab0d97ca4df1c59aa2a0 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 13 May 2014 17:21:08 +0200 Subject: adjust tests to new config and method implementation Ticket.is_creator_vlidated? now actually fetches the user from the db and returns false if it does not exist. --- engines/support/app/models/ticket.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/support/app') diff --git a/engines/support/app/models/ticket.rb b/engines/support/app/models/ticket.rb index d5a0b5d..bf5df53 100644 --- a/engines/support/app/models/ticket.rb +++ b/engines/support/app/models/ticket.rb @@ -98,7 +98,11 @@ class Ticket < CouchRest::Model::Base end def created_by_user - User.find(self.created_by) || AnonymousUser.new + if self.created_by + User.find(self.created_by) || AnonymousUser.new + else + AnonymousUser.new + end end def regarding_user_actual_user -- cgit v1.2.3