Closed Bug 513108 Opened 15 years ago Closed 15 years ago

Enforce uniqueness for all models

Categories

(Webtools Graveyard :: Cesium, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rdoherty, Assigned: jbalogh)

References

Details

Attachments

(1 file)

Doesn't appear that our constraints for username, site url and page are being enforced.
I don't see any constraints in the models.  What is it supposed to be?
This was enforced with Sites.for_user, so we're good.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
f, no this wasn't.

Requirements:
-Username must be unique
-Site base url should be unique
-Page url + site_id should be unique
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → jbalogh
Comment on attachment 401598 [details] [diff] [review]
adding unique constraint for (page.url, page.site_id)

We need uniqueness in the db, but when a user adds a site and pages to track, we shouldn't show any errors if the site and pages exist already.

Currently errors are displayed when adding a site that already exists ("Site with this Base url already exists.")
Attachment #401598 - Flags: review?(rdoherty) → review-
(In reply to comment #6)
> Currently errors are displayed when adding a site that already exists ("Site
> with this Base url already exists.")

I think that would be a different bug like "use page.get_or_create to make newish Pages".
(In reply to comment #7)
> (In reply to comment #6)
> > Currently errors are displayed when adding a site that already exists ("Site
> > with this Base url already exists.")
> 
> I think that would be a different bug like "use page.get_or_create to make
> newish Pages".

wfm if you create the bug :)
Attachment #401598 - Flags: review- → review+
r52069
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: