Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add guards to ensure that project exist before using project.identifier

  • Loading branch information...
commit 61337898de07703174eea4d6809c9cc44f9fe7bd 1 parent 663511f
@kikito kikito authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/redmine_sympa/patches/enabled_module_patch.rb
View
8 lib/redmine_sympa/patches/enabled_module_patch.rb
@@ -20,15 +20,15 @@ def is_a_sympa_module?
def sympa_enable_module
self.reload
- if(self.is_a_sympa_module?)
- RedmineSympa::SympaLogger.info("EnabledModule: Project #{self.project.identifier} needs a new mailing list. We must registers all its users, too.")
+ if(project && self.is_a_sympa_module?)
+ RedmineSympa::SympaLogger.info("EnabledModule: Project #{project.identifier} needs a new mailing list. We must registers all its users, too.")
RedmineSympa::Actions.create_list(project)
end
end
def sympa_disable_module
- if(self.is_a_sympa_module?)
- RedmineSympa::SympaLogger.info("EnabledModule: Project #{self.project.identifier} doesn't need a mailing list any more")
+ if(project && self.is_a_sympa_module?)
+ RedmineSympa::SympaLogger.info("EnabledModule: Project #{project.identifier} doesn't need a mailing list any more")
RedmineSympa::Actions.destroy_list(project)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.