Skip to content

Angelica Yee and Genesis Solar System Project Kunzite #27

Open
genesisquinn wants to merge 21 commits intoAda-C19:mainfrom
genesisquinn:query_params
Open

Angelica Yee and Genesis Solar System Project Kunzite #27
genesisquinn wants to merge 21 commits intoAda-C19:mainfrom
genesisquinn:query_params

Conversation

@genesisquinn
Copy link
Copy Markdown

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
Copy Markdown

@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 thread app/__init__.py
Comment on lines +18 to +19
#app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get(
# "SQLALCHEMY_DATABASE_URI")
Copy link
Copy Markdown

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 thread app/models/moon.py
Comment on lines +7 to +8
planet= db.relationship("Planet", back_populates="moons")
planet_id= db.Column(db.Integer, db.ForeignKey('planet.id'))
Copy link
Copy Markdown

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")
Copy link
Copy Markdown

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:
Copy link
Copy Markdown

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