MAKENTNU/web

View on GitHub

Showing 86 of 230 total issues

Avoid too many return statements within this function.
Open

return False
Severity: Major
Found in src/make_queue/models/reservation.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

    return _("The start time can't be after the end time")
    Severity: Major
    Found in src/make_queue/views/reservation.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

      return False
      Severity: Major
      Found in src/make_queue/models/reservation.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

        return not fail_if_not_standalone
        Severity: Major
        Found in src/news/models.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

          return False
          Severity: Major
          Found in src/make_queue/models/reservation.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

            return HttpResponseRedirect(reverse('admin_suggest_skill'))
            Severity: Major
            Found in src/checkin/views.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

              return False
              Severity: Major
              Found in src/make_queue/models/reservation.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                return False
                Severity: Major
                Found in src/make_queue/models/reservation.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                  return _("It is not possible to reserve the machine during these hours. Check the rules for when the machine is reservable")
                  Severity: Major
                  Found in src/make_queue/views/reservation.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                    return False
                    Severity: Major
                    Found in src/make_queue/models/reservation.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                      return all(rule.valid_time_in_rule(start_time, end_time, len(rules) > 1) for rule in rules)
                      Severity: Major
                      Found in src/make_queue/models/reservation.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                        return _("The reservation cannot start and end at the same time")
                        Severity: Major
                        Found in src/make_queue/views/reservation.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                          return False
                          Severity: Major
                          Found in src/make_queue/models/reservation.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                            return self.quota_can_create_reservation()
                            Severity: Major
                            Found in src/make_queue/models/reservation.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                              return _("The reservation exceeds your quota")
                              Severity: Major
                              Found in src/make_queue/views/reservation.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                return user_details
                                Severity: Major
                                Found in src/dataporten/ldap_utils.py - About 30 mins to fix

                                  Function _do_request_assertion_for_path has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def _do_request_assertion_for_path(self, path: str, language_prefix: str, client: Client, is_superuser: bool, test_case: SimpleTestCase):
                                  response = client.get(path)
                                   
                                  if self.redirect:
                                  test_case.assertIn(response.status_code, {HTTPStatus.MOVED_PERMANENTLY, HTTPStatus.FOUND},
                                  Severity: Minor
                                  Found in src/util/test_utils.py - About 25 mins to fix

                                  Function post has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def post(self, request):
                                  """
                                  Handles the request from the RFID card reader.
                                  Does a basic check for a valid card id.
                                   
                                   
                                  Severity: Minor
                                  Found in src/card/views.py - About 25 mins to fix

                                  Function isValidForRules has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function isValidForRules(rules, startTime, endTime) {
                                  /**
                                  * Checks if the period [startTime, endTime] is valid for the given set of rules
                                  */
                                  const coveredRules = getRulesCovered(rules, startTime, endTime);
                                  Severity: Minor
                                  Found in src/make_queue/static/make_queue/js/reservation_rule_utils.js - About 25 mins to fix

                                  Function post has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def post(self, request):
                                  scan_exists = RegisterProfile.objects.exists()
                                  response_dict = {
                                  'scan_exists': scan_exists,
                                  'scan_is_recent': False,
                                  Severity: Minor
                                  Found in src/checkin/api/views.py - About 25 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language