Changeset 2149


Ignore:
Timestamp:
01/22/07 13:23:38 (13 years ago)
Author:
melissa
Message:

Fixed bug causing two images to be created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/upload/OMEUploader.java

    r2117 r2149  
    739739    image.setCreated("now"); 
    740740    image.setDescription(xml.getDescription(null, null)); 
     741    ((MappedDTO) image).setNew(false); 
    741742 
    742743    df.update(image); 
     
    764765    df.update(ii); 
    765766 
     767    Criteria c = new Criteria(); 
     768    c.addWantedField("id"); 
     769    c.addWantedField("default_pixels"); 
     770    c.addFilter("id", "=", "" + image.getID()); 
     771    image = (Image) df.retrieve(Image.class, c); 
     772 
    766773    // define pixels information and link to pixels in OMEIS 
    767774 
    768     Pixels pixels = (Pixels) df.createNew("Pixels"); 
     775    Pixels pixels = image.getDefaultPixels(); 
    769776    pixels.setRepository(r); 
    770777    pixels.setImage(image); 
Note: See TracChangeset for help on using the changeset viewer.