Project

General

Profile

« Previous | Next » 

Revision 62372

fixed undefined organizations and apiParams

View differences:

datasource-create-form.component.ts
227 227
  }
228 228

  
229 229
  createNewRepository(): Repository {
230
    const newRepo: Repository = new Repository();
230
    const newRepo = new Repository();
231 231
    newRepo.officialName = this.group.get('officialName').value.toString();
232 232
    newRepo.englishName = this.group.get('englishName').value.toString();
233 233
    newRepo.websiteUrl = this.group.get('websiteUrl').value;
234 234
    newRepo.logoUrl = this.group.get('logoUrl').value;
235 235
    newRepo.contactEmail = this.group.get('adminEmail').value;
236
    newRepo.organizations[0].country = this.group.get('country').value; // countryCode
237
    newRepo.organizations[0].legalname = this.group.get('institutionName').value.toString();
236
    newRepo.organizations.push({
237
      legalshortname: null,
238
      legalname: this.group.get('institutionName').value.toString(),
239
      websiteurl: null,
240
      logourl: null,
241
      country: this.group.get('country').value
242
    });
238 243
    newRepo.latitude = this.group.get('latitude').value;
239 244
    newRepo.longitude = this.group.get('longtitude').value;
240 245
    newRepo.timezone = this.group.get('timezone').value;

Also available in: Unified diff