This repository has been archived by the owner on Feb 23, 2020. It is now read-only.
admin.py:244-245: Determine relevance of... #591
Labels
1
burning issue
30 mins
small issues. Usually cosmetic fixes
Admin renew
adapt admin to the options, tag and db templates integration
cleanup
everything that do project stronger, flexible, reusable
x2
task's price doubled. Usually because of burning
Comments
@artemiyds2 @duker33 please pay attention to this new issue. |
0pdd
referenced
this issue
Apr 11, 2019
This was referenced Apr 11, 2019
ArtemijRodionov
added
1
burning issue
30 mins
small issues. Usually cosmetic fixes
cleanup
everything that do project stronger, flexible, reusable
labels
Apr 11, 2019
duker33
added
the
Admin renew
adapt admin to the options, tag and db templates integration
label
Apr 12, 2019
@duker33 Should we? |
@artemiy312 , it depends on DB content: if we have at least one duplicated mark for any pair of Options, we should implement it. Otherwise not. Explore plz this fact. If it's true, create subtask for Options implementation |
In [1]: from django.db.models import Count
In [2]: from stroyprombeton.models import Option as O
In [3]: O.objects.values('mark').annotate(mark_count=Count('mark')).filter(mark_count__gt=1)
Out[3]: <OptionQuerySet [{'mark': 'Б-13', 'mark_count': 2}, {'mark': 'Ф6.201', 'mark_count': 2}, {'mark': 'ШЛП40п-9', 'mark_count': 3}, {'mark': '300ФП-1', 'mark_count': 2}, {'mark': 'РОП6.26-60', 'mark_count': 2}, {'mark': 'П-1-858', 'mark_count': 2}, {'mark': 'Ф5', 'mark_count': 5}, {'mark': '90Ш-1', 'mark_count': 2}, {'mark': 'ШТВ80.5', 'mark_count': 3}, {'mark': 'К15-3', 'mark_count': 2}, {'mark': '50СП-7в', 'mark_count': 4}, {'mark': 'Т6-4', 'mark_count': 2}, {'mark': 'Б-1а', 'mark_count': 2}, {'mark': 'ШТВ160.6', 'mark_count': 4}, {'mark': '50СП-7', 'mark_count': 2}, {'mark': 'Ф7.403', 'mark_count': 2}, {'mark': '9КФ175-1', 'mark_count': 2}, {'mark': 'К-3', 'mark_count': 2}, {'mark': 'К1-5', 'mark_count': 2}, {'mark': 'ТБ-1', 'mark_count': 2}, '...(remaining elements truncated)...']>
In [28]: O.objects.values('mark').annotate(mark_count=Count('mark')).filter(mark_count__gt=1).count()
Out[28]: 471 |
We have duplicated marks. |
ArtemijRodionov
added a commit
that referenced
this issue
Apr 17, 2019
* Adopt duplicate filter for Option model * Review fixes * Format a todo
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
1
burning issue
30 mins
small issues. Usually cosmetic fixes
Admin renew
adapt admin to the options, tag and db templates integration
cleanup
everything that do project stronger, flexible, reusable
x2
task's price doubled. Usually because of burning
The puzzle
433-a94ade77
from #433 has to be resolved:stroyprombeton/stroyprombeton/admin.py
Lines 244 to 245 in 200016a
The puzzle was created by Artemiy on 11-Apr-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
The text was updated successfully, but these errors were encountered: