Code

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11779 closed (duplicate)

Validation doesn't detect import errors

Reported by: Afief Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by Alex)

I have a model with a bug in it(I imported user instead of User from django.contrib.auth.models), here is the code:

from django.db import models
from django.contrib.auth.models import user

class myprofile(models.Model):
    user = models.ForeignKey(user, unique=True)

When running manage.py validate I get no errors, but when asking for the app's sql I am told that I probably didn't install it. What should happen is that the model shouldn't validate(or at least be told that the app is found but contains errors)

$ python manage.py validate
0 errors found

$ python manage.py sql myprofile
Error: App with label myprofile could not be found. Are you sure your INSTALLED_APPS setting is correct?

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by Alex

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Please use preview.

comment:2 follow-up: Changed 5 years ago by kmtracey

  • Resolution set to duplicate
  • Status changed from new to closed

This is really the same problem was #11696.

comment:3 in reply to: ↑ 2 Changed 5 years ago by kmtracey

Replying to kmtracey:

This is really the same problem was #11696.

...same problem AS...

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.