| Conditions | 2 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from django.db import models |
||
| 36 | def test_hstore_f_ref(): |
||
| 37 | model = get_fake_model({ |
||
| 38 | 'name': models.CharField(max_length=255), |
||
| 39 | 'name_new': HStoreField() |
||
| 40 | }) |
||
| 41 | |||
| 42 | model.objects.create( |
||
| 43 | name='waqas', |
||
| 44 | name_new=dict(en='swen') |
||
| 45 | ) |
||
| 46 | |||
| 47 | model.objects.update( |
||
| 48 | name_new=dict(en=models.F('name')) |
||
| 49 | ) |
||
| 50 | |||
| 51 | inst = model.objects.all().first() |
||
| 52 | assert inst.name_new.get('en') == 'waqas' |
||
| 53 |
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.