Skip to content
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

Angelica Yee and Genesis Solar System Project Kunzite #27

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

genesisquinn
Copy link

No description provided.

@genesisquinn genesisquinn reopened this May 4, 2023
@genesisquinn genesisquinn changed the title Completed This is the one Angelica and Genesis Solar System Project Kunzite May 4, 2023
@genesisquinn genesisquinn changed the title Angelica and Genesis Solar System Project Kunzite Angelica Yes and Genesis Solar System Project Kunzite May 4, 2023
@genesisquinn genesisquinn changed the title Angelica Yes and Genesis Solar System Project Kunzite Angelica Yee and Genesis Solar System Project Kunzite May 4, 2023
Copy link

@spitsfire spitsfire left a comment

Choose a reason for hiding this comment

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

Looks good! Keep an eye on your responses, though. You want to keep them as consistent as possible and include a status code

Comment on lines +18 to +19
#app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get(
# "SQLALCHEMY_DATABASE_URI")

Choose a reason for hiding this comment

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

Suggested change
#app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get(
# "SQLALCHEMY_DATABASE_URI")

Let's remove commented code if we aren't using it

Comment on lines +7 to +8
planet= db.relationship("Planet", back_populates="moons")
planet_id= db.Column(db.Integer, db.ForeignKey('planet.id'))

Choose a reason for hiding this comment

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

Suggested change
planet= db.relationship("Planet", back_populates="moons")
planet_id= db.Column(db.Integer, db.ForeignKey('planet.id'))
planet = db.relationship("Planet", back_populates="moons")
planet_id = db.Column(db.Integer, db.ForeignKey('planet.id'))

db.session.delete(planet)
db.session.commit()

return make_response(f"Planet#{planet.id} successfully deleted")

Choose a reason for hiding this comment

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

whoops, you forgot your status code

planet=validate_model(Planet, planet_id)
request_body=request.get_json()

if request_body.get("name") is None or request_body.get("description") is None or request_body.get("moons") is None:

Choose a reason for hiding this comment

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

Suggested change
if request_body.get("name") is None or request_body.get("description") is None or request_body.get("moons") is None:
if request_body.get("name") is None or \
request_body.get("description") is None or \
request_body.get("moons") is None:

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