Skip to content

Commit

Permalink
fix add question
Browse files Browse the repository at this point in the history
  • Loading branch information
siltomato committed Jan 21, 2025
1 parent c5ca852 commit 188fddf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class QuestionDialogComponent extends SubscriptionDisposable implements O
this.scriptureEnd.setValue(endVerseRef.toString());
}
this.updateSelection();
} else if (this.data.defaultVerse != null) {
} else if (this.data.defaultVerse != null && this.data.defaultVerse.bookNum > 0) {
const { startVerseRef, endVerseRef } = toStartAndEndVerseRefs(this.data.defaultVerse);
this.scriptureStart.setValue(startVerseRef.toString());
if (endVerseRef != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class QuestionDialogService {

private async canCreateAndEditQuestions(projectId: string): Promise<boolean> {
const userId = this.userService.currentUserId;
const project = (await this.projectService.get(projectId)).data;
const project = (await this.projectService.getProfile(projectId)).data;
return (
project != null &&
SF_PROJECT_RIGHTS.hasRight(project, userId, SFProjectDomain.Questions, Operation.Create) &&
Expand Down

0 comments on commit 188fddf

Please sign in to comment.