Skip to content

Added Model and resouce for work status and issues #1155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

saravanpa-aot
Copy link
Collaborator

@saravanpa-aot saravanpa-aot commented Nov 2, 2023

Related
tickets #1107,
#920

  • Added the Models for work status and issues
  • Added a basic resource and service

work_issue_id = Column(ForeignKey('work_issues.id'), nullable=False)
work_issue = relationship('WorkIssues', back_populates='updates')

def as_dict(self): # pylint:disable=arguments-differ
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if you don't put this as_dict() method here, you still be able to get it from the BaseModel

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we even need as_dict? since we use marshamallow , i wasnt sure..just kept it there..

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we even need as_dict? since we use marshamallow , i wasnt sure..just kept it there..

Sometimes I use it when I update stuff. like, status.update(status.as_dict(recursive=False)). I want to pass a dict. yes, I can dump a json using Marshmallow response. I haven't tried that. Lets check the possibility

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed for now..

@@ -105,3 +105,5 @@
API.add_namespace(RESPONSIBILITY_API, path="/responsibilities")
API.add_namespace(OUTCOME_CONFIGURATION_API, path="/outcome-configurations")
API.add_namespace(ACT_SECTION_API, path="/act-sections")
API.add_namespace(WORK_STATUS_API, path='/work/<int:work_id>/status')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it would be good to have plurals in the URL like statuses instead of status

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to statuses

@dinesh-aot dinesh-aot merged commit 81fcf92 into bcgov:develop Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants