Project

General

Profile

« Previous | Next » 

Revision 48512

Project landing & Dataprovider landing: tiny changes in charts for statistics | parsingFunctions.class: bug fix in changeBestAccessMode function | Organization landing: number of badge in projects' tab never changes - project publications (csv): bug fix in queries | Landing pages: check existence for basic info | Loading modal: changes about uikit

View differences:

parsingFunctions.class.ts
233 233
        mapStructure.get(key)['accessMode'].push(instance['licence'].classid);
234 234
      }
235 235

  
236
      if(this.changeBestAccessMode(mapStructure.get(key)['bestAccessMode'], instance['licence'].classid)) {
236
      if(this.changeBestAccessMode(mapStructure.get(key)['bestAccessMode'], instance['licence'])) {
237 237
        mapStructure.get(key)['bestAccessMode'] = instance['licence'].classid;
238 238
      }
239

  
240 239
    } else if(url) {
241 240
      mapStructure.get(key)['accessMode'].push("");
242 241
    }
243 242
  }
244 243

  
245 244
  // publication & dataset landing : for downloadFrom and publishedIn
246
  changeBestAccessMode(currentAccessMode: string, accessMode: string): boolean {
245
  changeBestAccessMode(currentAccessMode: string, accessMode: any): boolean {
246
    if(!accessMode) {
247
      return false;
248
    }
249
    accessMode = accessMode.classid;
250

  
247 251
    switch (currentAccessMode) {
248 252
      case null:
249 253
        return true;
......
363 367
            classifiedSubjects = new Map<string, string[]>();
364 368
          }
365 369

  
366
          if(classifiedSubjects.has(subject.classname)) {
370
          if(!classifiedSubjects.has(subject.classname)) {
367 371
            classifiedSubjects.set(subject.classname, new Array<string>());
368 372
          }
369 373

  
......
437 441
  }
438 442

  
439 443
  parseTypes(types: string[], uniqueTypes: Set<string>, instance: any) {
440
    if(instance.hasOwnProperty("instancetype")) {
444
    if(instance.hasOwnProperty("instancetype") && instance['instancetype'].classname) {
441 445
      if(!uniqueTypes.has(instance['instancetype'].classname)) {
442 446
        types.push(instance['instancetype'].classname);
443 447
        uniqueTypes.add(instance['instancetype'].classname);

Also available in: Unified diff