• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

iplweb / bpp / 18634744198

19 Oct 2025 07:00PM UTC coverage: 31.618% (-29.9%) from 61.514%
18634744198

push

github

mpasternak
Merge branch 'release/v202510.1270'

657 of 9430 branches covered (6.97%)

Branch coverage included in aggregate %.

229 of 523 new or added lines in 42 files covered. (43.79%)

11303 existing lines in 316 files now uncovered.

14765 of 39346 relevant lines covered (37.53%)

0.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.47
src/bpp/views/admin.py
1
import copy
1✔
2

3
try:
1✔
4
    from django.core.urlresolvers import reverse
1✔
5
except ImportError:
1✔
6
    from django.urls import reverse
1✔
7

8
from django.db import transaction
1✔
9
from django.http.response import Http404
1✔
10
from django.views.generic import RedirectView
1✔
11

12
from bpp.models.patent import Patent, Patent_Autor
1✔
13
from bpp.models.wydawnictwo_ciagle import Wydawnictwo_Ciagle, Wydawnictwo_Ciagle_Autor
1✔
14
from bpp.models.wydawnictwo_zwarte import Wydawnictwo_Zwarte, Wydawnictwo_Zwarte_Autor
1✔
15

16

17
class TozView(RedirectView):
1✔
18
    @transaction.atomic
1✔
19
    def get_redirect_url(self, pk):
1✔
UNCOV
20
        try:
×
UNCOV
21
            w = self.klass.objects.get(pk=pk)
×
22
        except self.klass.DoesNotExist:
×
23
            raise Http404
×
24

UNCOV
25
        w_copy = copy.copy(w)
×
UNCOV
26
        w_copy.id = None
×
UNCOV
27
        w_copy.tytul_oryginalny = "[ ** KOPIA ** ]" + w_copy.tytul_oryginalny
×
UNCOV
28
        w_copy.slug = None
×
UNCOV
29
        w_copy.save()
×
30

UNCOV
31
        for wca in self.klass_autor.objects.filter(rekord=w):
×
32
            wca_copy = copy.copy(wca)
×
33
            wca_copy.id = None
×
34
            wca_copy.rekord = w_copy
×
35
            wca_copy.save()
×
36

UNCOV
37
        return reverse("admin:bpp_%s_change" % self.klass_name, args=(w_copy.pk,))
×
38

39

40
class WydawnictwoCiagleTozView(TozView):
1✔
41
    klass = Wydawnictwo_Ciagle
1✔
42
    klass_autor = Wydawnictwo_Ciagle_Autor
1✔
43
    klass_name = "wydawnictwo_ciagle"
1✔
44

45

46
class WydawnictwoZwarteTozView(TozView):
1✔
47
    klass = Wydawnictwo_Zwarte
1✔
48
    klass_autor = Wydawnictwo_Zwarte_Autor
1✔
49
    klass_name = "wydawnictwo_zwarte"
1✔
50

51

52
class PatentTozView(TozView):
1✔
53
    klass = Patent
1✔
54
    klass_autor = Patent_Autor
1✔
55
    klass_name = "patent"
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc