refreshRelations static method

Implementation

static Future<PolicyPresentationModel> refreshRelations(
    PolicyPresentationModel model) async {
  AppPolicyModel? policiesHolder;
  if (model.policies != null) {
    try {
      await appPolicyRepository(appId: model.appId)!
          .get(model.policies!.documentID)
          .then((val) {
        policiesHolder = val;
      }).catchError((error) {});
    } catch (_) {}
  }

  return model.copyWith(
    policies: policiesHolder,
  );
}