mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-07-26 11:38:13 +00:00
Fix: Handle "None" provider selection in DNS record management.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/62bba02a-dc54-4742-a2dc-90482cad273d.jpg
This commit is contained in:
@@ -168,7 +168,7 @@ export default function DnsRecordsPage() {
|
||||
if (!domainId) throw new Error("Domain ID is required");
|
||||
|
||||
// Convert empty providerId to null
|
||||
const providerId = data.providerId === "" ? null : data.providerId;
|
||||
const providerId = data.providerId === "" || data.providerId === "none" ? null : data.providerId;
|
||||
|
||||
const recordData: InsertDnsRecord = {
|
||||
...data,
|
||||
@@ -204,7 +204,7 @@ export default function DnsRecordsPage() {
|
||||
const updateRecordMutation = useMutation({
|
||||
mutationFn: async ({ id, data }: { id: string, data: z.infer<typeof dnsRecordSchema> }) => {
|
||||
// Convert empty providerId to null
|
||||
const providerId = data.providerId === "" ? null : data.providerId;
|
||||
const providerId = data.providerId === "" || data.providerId === "none" ? null : data.providerId;
|
||||
|
||||
const updatedData = {
|
||||
...data,
|
||||
@@ -518,7 +518,7 @@ export default function DnsRecordsPage() {
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent>
|
||||
<SelectItem value="">None</SelectItem>
|
||||
<SelectItem value="none">None</SelectItem>
|
||||
{providers.map((provider) => (
|
||||
<SelectItem
|
||||
key={provider.id}
|
||||
@@ -758,7 +758,7 @@ export default function DnsRecordsPage() {
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent>
|
||||
<SelectItem value="">None</SelectItem>
|
||||
<SelectItem value="none">None</SelectItem>
|
||||
{providers.map((provider) => (
|
||||
<SelectItem
|
||||
key={provider.id}
|
||||
|
||||
Reference in New Issue
Block a user