Changeset 20653


Ignore:
Timestamp:
2009-09-21T13:41:38+12:00 (15 years ago)
Author:
kjdon
Message:

if we are updating the classifier ie a document is being reclassified, then we need to delete the old stored metadata values, otherwise the doc will appear twice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/classify/List.pm

    r20424 r20653  
    336336    # Take care not to do a metadata group more than once
    337337    unless ($metadata_groups_done{$metadata_group}) {
     338        if ($edit_mode eq "update") {
     339        # if we are updating, we delete all the old values before
     340        # adding the new ones, otherwise, the section will end up in
     341        # the classifier twice.
     342        delete $self->{$metadata_group . ".list"}->{$section_OID};
     343        }
    338344        foreach my $metadata_element (split(/\;|,/, $metadata_group)) {     
    339345        my $real_metadata_element = $self->strip_ex_from_metadata($metadata_element);
Note: See TracChangeset for help on using the changeset viewer.