Allow looking up resources for deferred models

Review Request #7603 — Created Aug. 20, 2015 and submitted

Information

Djblets
release-0.9.x

Reviewers

Previously, if you tried to look up the resource for a deferred model,
it would not return a resource. This has been corrected.

Attempted to look up the resource of a deferred model. It worked.

Ran unit tests.

Description From Last Updated

Too many blank lines.

chipx86chipx86

Probably should catch here and do the unregister in a finally clause.

chipx86chipx86

I'd group these.

chipx86chipx86

And these.

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/webapi/resources/registry.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/webapi/resources/registry.py
    
    
  2. 
      
chipx86
  1. Awesome :) Glad to see this fixed.

    Can you throw together a unit test so it doesn't regress if Django does something different?

  2. 
      
brennie
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/testing/testcases.py
        djblets/webapi/tests/test_registry.py
        djblets/webapi/resources/registry.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/testing/testcases.py
        djblets/webapi/tests/test_registry.py
        djblets/webapi/resources/registry.py
    
    
  2. 
      
brennie
chipx86
  1. 
      
  2. djblets/webapi/tests/test_registry.py (Diff revision 2)
     
     
     
     
     

    Too many blank lines.

  3. djblets/webapi/tests/test_registry.py (Diff revision 2)
     
     

    Probably should catch here and do the unregister in a finally clause.

  4. djblets/webapi/tests/test_registry.py (Diff revision 2)
     
     
     
     

    I'd group these.

  5. djblets/webapi/tests/test_registry.py (Diff revision 2)
     
     
     
     

    And these.

  6. 
      
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/testing/testcases.py
        djblets/webapi/tests/test_registry.py
        djblets/webapi/resources/registry.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/testing/testcases.py
        djblets/webapi/tests/test_registry.py
        djblets/webapi/resources/registry.py
    
    
  2. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/testing/testcases.py
        djblets/webapi/tests/test_registry.py
        djblets/webapi/resources/registry.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/testing/testcases.py
        djblets/webapi/tests/test_registry.py
        djblets/webapi/resources/registry.py
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.9.x (0457307)
Loading...