[PR #23104] [CLOSED] fix: license date comparison type error #65885

Closed
opened 2026-05-06 11:55:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23104
Author: @yang1002378395-cmyk
Created: 3/26/2026
Status: Closed

Base: devHead: fix-license-date-comparison-dev


📝 Commits (1)

  • e209563 fix: license date comparison type error

📊 Changes

1 file changed (+11 additions, -1 deletions)

View changed files

📝 backend/open_webui/utils/auth.py (+11 -1)

📄 Description

Pull Request Checklist

  • Target branch: This PR targets the dev branch
  • Description: Fixed TypeError in license validation
  • Changelog: See below
  • Documentation: Not needed (bug fix)
  • Dependencies: None
  • Testing: Syntax check passed, logic verified

Changelog Entry

Description

Fixed

  • Added proper type conversion for exp field from JSON
  • Supports ISO format strings (e.g., "2026-12-31" or "2026-12-31T00:00:00")
  • Supports YYYY-MM-DD format
  • Gracefully handles invalid date strings

Root Cause

The exp field from JSON parsing returns a string, but the code compared it directly with datetime.now().date(), causing:

TypeError: '<' not supported between instances of 'str' and 'datetime.date'

Testing

  • Syntax check passed
  • Code review: logic verified
  • Manual testing with l.data file pending (awaiting user confirmation)

Contributor License Agreement

🤖 Generated with OpenClaw AI


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23104 **Author:** [@yang1002378395-cmyk](https://github.com/yang1002378395-cmyk) **Created:** 3/26/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-license-date-comparison-dev` --- ### 📝 Commits (1) - [`e209563`](https://github.com/open-webui/open-webui/commit/e2095633cb9e4a3a8e1385f8c7795f7a1ec37d40) fix: license date comparison type error ### 📊 Changes **1 file changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/auth.py` (+11 -1) </details> ### 📄 Description # Pull Request Checklist - [x] **Target branch:** This PR targets the `dev` branch - [x] **Description:** Fixed TypeError in license validation - [x] **Changelog:** See below - [x] **Documentation:** Not needed (bug fix) - [x] **Dependencies:** None - [x] **Testing:** Syntax check passed, logic verified # Changelog Entry ### Description - Fixed TypeError when comparing license expiry date with current date - Fixes #23094 ### Fixed - Added proper type conversion for `exp` field from JSON - Supports ISO format strings (e.g., "2026-12-31" or "2026-12-31T00:00:00") - Supports YYYY-MM-DD format - Gracefully handles invalid date strings ### Root Cause The `exp` field from JSON parsing returns a string, but the code compared it directly with `datetime.now().date()`, causing: ``` TypeError: '<' not supported between instances of 'str' and 'datetime.date' ``` ### Testing - [x] Syntax check passed - [x] Code review: logic verified - [ ] Manual testing with l.data file pending (awaiting user confirmation) ### Contributor License Agreement - [x] I confirm that I have read and agree to the [Contributor License Agreement](https://github.com/open-webui/.github/blob/main/CLA.md) of this project. 🤖 Generated with [OpenClaw AI](https://openclaw.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 11:55:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#65885