Project

General

Profile

Bug #12467

Change avatar make error 'undefined local variable or method `old_avatar''

Added by Kerguillec Paul about 3 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Authentication
Target version:
-
Difficulty:
easy
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Before I noticed this bug http://projects.theforeman.org/issues/12325 I tried to change my avatar on my LDAP server.
When logout and login again I had this issue:

undefined local variable or method `old_avatar' for #<Class:0x00000005b47ee0>

The full trace is here: http://pastebin.com/PH9Y5nBj

History

#1 Updated by Dominic Cleal about 3 years ago

  • Category set to Authentication
  • Assignee deleted (Dominic Cleal)
  • Difficulty set to easy

The old_avatar variable is undefined, I think the Rails.public_path bit is meant to be assigned to a variable in order to check the file's existence.

https://github.com/theforeman/foreman/blob/1.10.0-RC2/app/models/user.rb#L205

#2 Updated by boaz shust 3 months ago

fixed in 1.20.0-develop.

#3 Updated by Marek Hulán 3 months ago

  • Status changed from New to Resolved
  • Fixed in Releases 1.20.0 added

Thanks Boaz, marking as resolved. Could you please link the redmine issue that solved it?

Also available in: Atom PDF