ices-tools-prod / icesSAG

R interface to Stock Assessment Graphs database web services
https://sg.ices.dk/webservices.aspx
11 stars 7 forks source link

Custom graphs don't come in the download #134

Closed cmspinto closed 7 years ago

cmspinto commented 7 years ago

When people download the zip file the custom graphs don't come in the download

cmspinto commented 7 years ago

The custom graphs had changed number and it was not updated in the code. The custom graphs still had the old numbers. So what happen is that it was not picking the setting:

if (!string.IsNullOrEmpty(StandardGraph.getSetting(key, 15, 50))) // This setting says to hide the graph { addFileToZIP(ref zEntry, ref zStream, getGraphName("CustomGraph1", key, 15, stockVersionName)); } if (!string.IsNullOrEmpty(StandardGraph.getSetting(key, 16, 50))) // This setting says to hide the graph { addFileToZIP(ref zEntry, ref zStream, getGraphName("CustomGraph2", key, 16, stockVersionName)); } if (!string.IsNullOrEmpty(StandardGraph.getSetting(key, 17, 50))) // This setting says to hide the graph { addFileToZIP(ref zEntry, ref zStream, getGraphName("CustomGraph3", key, 17, stockVersionName)); } if (!string.IsNullOrEmpty(StandardGraph.getSetting(key, 18, 50))) // This setting says to hide the graph { addFileToZIP(ref zEntry, ref zStream, getGraphName("CustomGraph4", key, 18, stockVersionName)); }

            if (string.IsNullOrEmpty(StandardGraph.getSetting(key, 19, 22))) // This setting says to hide the graph
            {
            ///////////////////////////////////////////////////// This is to garantee the picture exists \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                TakeAPictureOfStockStatus t = new TakeAPictureOfStockStatus(key);///////////////////////////////////////////////////// This is to garantee the picture exists \\\\\\\\\\\\\\\\\\\\\\\\\\\\\                
                t.savePicture();

                addFileToZIP(ref zEntry, ref zStream, getGraphName("StockStatus", key, 19, stockVersionName));
            }