-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Sublet Drafting #271
Open
dr-Jess
wants to merge
16
commits into
master
Choose a base branch
from
sublet-drafting
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Sublet Drafting #271
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3880930
Add drafting to sublet model
dr-Jess 0c23330
Add draft field validation
dr-Jess beaf30d
Fix validations for sublet draft status
dr-Jess 671e10a
Lint
dr-Jess af0f247
Fix draft status implementation bug
dr-Jess 89b0d6a
Fix incorrect logic on draft validation
dr-Jess c078671
Minor fix to validation
dr-Jess 3f3ca47
Migrate drafting logic to use is_published instead
dr-Jess 2e3439d
Update testing code to be compatible with PyCharm Django test runner …
dr-Jess 8e0d48d
Add additional testing for sublet drafting
dr-Jess d79127c
Clean up draft validation logic
dr-Jess ffecf36
Merge branch 'master' of github.com:pennlabs/penn-mobile into sublet-…
dr-Jess bdc4f4e
Update sublet viewing to only show sublets that are published when no…
dr-Jess 2cfb9dc
Fix tests
dr-Jess 49793f9
Slightly clean up draft validation logic
dr-Jess 8859861
Clean up draft validation logic further
dr-Jess File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
backend/sublet/migrations/0005_sublet_is_draft_alter_sublet_end_date_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 5.0.2 on 2024-03-15 22:34 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("sublet", "0004_alter_sublet_external_link"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="sublet", name="is_draft", field=models.BooleanField(default=True), | ||
), | ||
migrations.AlterField( | ||
model_name="sublet", name="end_date", field=models.DateField(blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="sublet", | ||
name="expires_at", | ||
field=models.DateTimeField(blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="sublet", name="price", field=models.IntegerField(blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="sublet", name="start_date", field=models.DateField(blank=True, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha this doesn't work I don't know why haha 😭 will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks haha. is there any way we can break this down? i get that its the least amount of lines but i feel like its getting a little hard to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would really suggest breaking it into first checking if the function came from a PUT/PATCH or a POST
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it would seem that patching with "" as the address passes the old address into validated_data??? really not sure why but will investigate further tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is weird ...