Added a test for trac ticket 4471, and fixed the issue.

This commit is contained in:
Matt Amos 2012-09-21 00:45:53 +01:00 committed by Tom Hughes
parent 5c39e5870d
commit 8523f53099
2 changed files with 31 additions and 0 deletions

View file

@ -77,6 +77,12 @@ class Relation < ActiveRecord::Base
relation.add_tag_keyval(tag['k'], tag['v'])
end
# need to initialise the relation members array explicitly, as if this
# isn't done for a new relation then @members attribute will be nil,
# and the members will be loaded from the database instead of being
# empty, as intended.
relation.members = Array.new
pt.find('member').each do |member|
#member_type =
logger.debug "each member"