Skip to content

Commit

Permalink
fix: Nullable edu program type with many profiles (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
0niel authored Feb 25, 2023
1 parent d279149 commit c2ad8e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/data/datasources/user_remote.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:rtu_mirea_app/data/models/employee_model.dart';
import 'package:rtu_mirea_app/data/models/nfc_pass_model.dart';
import 'package:rtu_mirea_app/data/models/score_model.dart';
import 'package:rtu_mirea_app/data/models/user_model.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

abstract class UserRemoteData {
Future<String> auth();
Expand Down Expand Up @@ -72,6 +73,8 @@ class UserRemoteDataImpl implements UserRemoteData {
throw ServerException('Response status code is ${response.statusCode}');
}
} catch (e) {
Sentry.captureException(e, stackTrace: StackTrace.current);

throw ServerException(e.toString());
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/domain/entities/edu_program.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class EduProgram extends Equatable {
final String eduProgramCode;
final String department;
final String prodDepartment;
final String type;
final String? type;

const EduProgram({
required this.eduProgram,
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/pages/profile/profile_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ProfileDetailPage extends StatelessWidget {
const SizedBox(height: 23),
CopyTextBlockWithLabel(
label: "Вид образовательной программы",
text: student.eduProgram.type),
text: student.eduProgram.type ?? ""),
],
),
),
Expand Down

0 comments on commit c2ad8e6

Please sign in to comment.