refreshRelations static method

Future<AlbumEntryModel> refreshRelations(
  1. AlbumEntryModel model
)

Implementation

static Future<AlbumEntryModel> refreshRelations(AlbumEntryModel model) async {
  PlatformMediumModel? mediumHolder;
  if (model.medium != null) {
    try {
      await platformMediumRepository()!
          .get(model.medium!.documentID)
          .then((val) {
        mediumHolder = val;
      }).catchError((error) {});
    } catch (_) {}
  }

  return model.copyWith(
    medium: mediumHolder,
  );
}