Skip to content

Commit

Permalink
fix: extra questions read only conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
romanetar committed Dec 2, 2024
1 parent 5be0ca2 commit bdde198
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/attendees/edit-summit-attendee-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class EditSummitAttendeePage extends React.Component {
this.setState({ ExtraQuestionsFormReadOnly: false });
this.props.getAttendee(new_attendee_id).then(() => {
this.props.getAllowedExtraQuestions(new_attendee_id).then((payload) => {
if (!payload.length) {
if (payload.length === 0) {
// we dont have any available extra questions, check if we have some related to
// deactivated tickets
this.props.getAllowedExtraQuestions(new_attendee_id, false);
Expand All @@ -72,7 +72,7 @@ class EditSummitAttendeePage extends React.Component {
this.setState({ ...this.state, ExtraQuestionsFormReadOnly: false });
this.props.getAttendee(newId).then(() => {
this.props.getAllowedExtraQuestions(newId).then((payload) => {
if (!payload?.response?.total) {
if (payload.length === 0) {
// we dont have any available extra questions, check if we have some related to
// deactivated tickets
this.props.getAllowedExtraQuestions(newId, false);
Expand All @@ -94,7 +94,7 @@ class EditSummitAttendeePage extends React.Component {
saveAttendee(entity).then(() => {
if (entity.id) {
getAllowedExtraQuestions(entity.id).then((payload) => {
if (!payload?.response?.total) {
if (payload.length === 0) {
// we dont have any available extra questions, check if we have some related to
// deactivated tickets
this.props.getAllowedExtraQuestions(entity.id, false);
Expand Down

0 comments on commit bdde198

Please sign in to comment.