Skip to content

Commit

Permalink
fix: propTypes warning
Browse files Browse the repository at this point in the history
* the recordRestrictionGracePeriod property is a number. the object
  which it is in the beginning in python (timedelta object) is reduced to
  the days in https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html#L45
  • Loading branch information
utnapischtim authored and fenekku committed Oct 23, 2024
1 parent d5c27f8 commit 76a739a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ AccessRightFieldCmp.propTypes = {
showMetadataAccess: PropTypes.bool,
community: PropTypes.object,
record: PropTypes.object.isRequired,
recordRestrictionGracePeriod: PropTypes.object.isRequired,
recordRestrictionGracePeriod: PropTypes.number.isRequired,
allowRecordRestriction: PropTypes.bool.isRequired,
};

Expand Down Expand Up @@ -140,7 +140,7 @@ AccessRightField.propTypes = {
labelIcon: PropTypes.string,
isMetadataOnly: PropTypes.bool,
record: PropTypes.object.isRequired,
recordRestrictionGracePeriod: PropTypes.object.isRequired,
recordRestrictionGracePeriod: PropTypes.number.isRequired,
allowRecordRestriction: PropTypes.bool.isRequired,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ MetadataAccess.propTypes = {
recordAccess: PropTypes.string.isRequired,
communityAccess: PropTypes.string.isRequired,
record: PropTypes.object.isRequired,
recordRestrictionGracePeriod: PropTypes.object.isRequired,
recordRestrictionGracePeriod: PropTypes.number.isRequired,
allowRecordRestriction: PropTypes.bool.isRequired,
};

0 comments on commit 76a739a

Please sign in to comment.