Skip to content

Commit

Permalink
Load more schemas at once
Browse files Browse the repository at this point in the history
  • Loading branch information
futa-ikeda authored and adlius committed Apr 12, 2023
1 parent 96d8cfd commit b231366
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/registries/addon/branded/new/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { restartableTask, task, timeout } from 'ember-concurrency';
import DraftRegistrationModel from 'ember-osf-web/models/draft-registration';
import NodeModel from 'ember-osf-web/models/node';
import { Permission } from 'ember-osf-web/models/osf-model';
import RegistrationProviderModel from 'ember-osf-web/models/registration-provider';
import RegistrationSchemaModel from 'ember-osf-web/models/registration-schema';
import Analytics from 'ember-osf-web/services/analytics';
import CurrentUserService from 'ember-osf-web/services/current-user';
Expand Down Expand Up @@ -60,7 +61,9 @@ export default class BrandedRegistriesNewSubmissionController extends Controller
@waitFor
async findAllSchemas() {
try {
const schemas = await this.model.schemas;
const schemas = await (this.model as RegistrationProviderModel).queryHasMany('schemas', {
'page[size]': 100,
});
[this.selectedSchema] = schemas.toArray();
this.schemaOptions = schemas;
} catch (e) {
Expand Down

0 comments on commit b231366

Please sign in to comment.